[git commit] config: add support for <custom>_defconfig

Carmelo Amoroso carmelo.amoroso at st.com
Tue Oct 25 04:54:34 UTC 2011


commit: http://git.uclibc.org/uClibc/commit/?id=b9055a68dd1e17e6cdc816ef6e1aa213592f38ca
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

Add support for platform specific and/or custom defconfig
per arch. They have to be suffixed by '_defconfig' and are
automatically detected and displayed by issuing 'make ARCH=<arch> help'.

Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>
---
 Makefile.help |    6 ++++++
 Makefile.in   |    5 +++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/Makefile.help b/Makefile.help
index d99cf96..a98d330 100644
--- a/Makefile.help
+++ b/Makefile.help
@@ -28,6 +28,12 @@ help:
 	@echo '  oldconfig		- resolve any unresolved symbols in .config'
 	@echo '  silentoldconfig	- resolve any unresolved symbols in .config, silently'
 	@echo '  randconfig		- generate a random .config'
+	@$(if $(arch-defconfigs), \
+		@echo ''; \
+		echo 'Architecture specific configs ($(ARCH))'; \
+		$(foreach c, $(arch-defconfigs), \
+			printf "  %-21s - Build for %s\\n" $(c) $(subst _defconfig,,$(c));) \
+	)
 	@echo
 	@echo 'Installation:'
 	@echo '  install		- install both the runtime and the headers'
diff --git a/Makefile.in b/Makefile.in
index 615ee3e..75965ae 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -422,6 +422,8 @@ $(addprefix $(top_builddir),include include/bits include/sys include/config lib
 $(conf) $(mconf): | $(top_builddir)include/config $(top_builddir)extra/config/lxdialog
 	$(Q)$(MAKE) -C extra/config $(@F)
 
+arch-defconfigs := $(notdir $(wildcard $(top_srcdir)extra/Configs/defconfigs/$(ARCH)/*_defconfig))
+
 menuconfig: $(mconf)
 	$(Q)$< extra/Configs/Config.in
 
@@ -453,6 +455,9 @@ allnoconfig: $(conf)
 defconfig: $(conf)
 	$(Q)$< -D extra/Configs/defconfigs/$(ARCH)/$@ extra/Configs/Config.in
 
+%_defconfig: $(conf)
+	$(Q)$< -D extra/Configs/defconfigs/$(ARCH)/$@ extra/Configs/Config.in
+
 menuconfig-clean-y:
 	$(Q)$(MAKE) -C extra/config CLEAN_extra/config
 


More information about the uClibc-cvs mailing list