path: root/Makefile
diff options
authorGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2013-12-05 20:11:12 +0100
committerGravatar Peter Korsgaard <peter@korsgaard.com>2013-12-08 22:49:00 +0100
commitff9d6e306032a680e9db43673d9ab57db7d1bf75 (patch)
tree18e5f21bd5cc36363a7e7e8fe1161dc26ca4a751 /Makefile
parent8eb8aaf904170ed25778b72f2e05dd5b9be059a4 (diff)
core: allow external defconfigs to be used
This commit allows the user to store defconfigs in $BR2_EXTERNAL/configs/. To achieve this: * It adds a new %_defconfig that looks in $BR2_EXTERNAL/configs/ for the corresponding defconfig file. * Updates the help target to also list external defconfigs. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Acked-by: Ryan Barnett <rjbarnet@rockwellcollins.com> Tested-by: "Samuel Martin" <s.martin49@gmail.com> Acked-by: "Samuel Martin" <s.martin49@gmail.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'Makefile')
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 09bc83adda..d52182e8d6 100644
--- a/Makefile
+++ b/Makefile
@@ -741,6 +741,10 @@ defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
@mkdir -p $(BUILD_DIR)/buildroot-config
@$(COMMON_CONFIG_ENV) $< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
+%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(BR2_EXTERNAL)/configs/%_defconfig outputmakefile
+ @mkdir -p $(BUILD_DIR)/buildroot-config
+ @$(COMMON_CONFIG_ENV) $< --defconfig=$(BR2_EXTERNAL)/configs/$@ $(CONFIG_CONFIG_IN)
savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
@mkdir -p $(BUILD_DIR)/buildroot-config
@@ -849,8 +853,15 @@ endif
@echo ' make V=0|1 - 0 => quiet build (default), 1 => verbose build'
@echo ' make O=dir - Locate all output files in "dir", including .config'
+ @echo 'Built-in configs:'
@$(foreach b, $(sort $(notdir $(wildcard $(TOPDIR)/configs/*_defconfig))), \
printf " %-35s - Build for %s\\n" $(b) $(b:_defconfig=);)
+ifneq ($(wildcard $(BR2_EXTERNAL)/configs/*_defconfig),)
+ @echo
+ @echo 'User-provided configs:'
+ @$(foreach b, $(sort $(notdir $(wildcard $(BR2_EXTERNAL)/configs/*_defconfig))), \
+ printf " %-35s - Build for %s\\n" $(b) $(b:_defconfig=);)
@echo 'See docs/README, or generate the Buildroot manual for further details'