Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] Makefile: defconfig: use BR2_DEFCONFIG only when the file exists
@ 2013-05-30 13:57 Fabio Porcedda
  2013-05-30 14:01 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Porcedda @ 2013-05-30 13:57 UTC (permalink / raw)
  To: buildroot

This is to be able to use "make defconfig" even when BR2_DEFCONFIG has
a filename that does not exist or use the default value that
does not exists.

Example on a clean installation, without a "./defconfig":
   make defconfig
   make defconfig

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index e8647d1..57bf8b3 100644
--- a/Makefile
+++ b/Makefile
@@ -698,7 +698,7 @@ olddefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 
 defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
-	@$(COMMON_CONFIG_ENV) $< --defconfig$(if $(DEFCONFIG),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN)
+	@$(COMMON_CONFIG_ENV) $< --defconfig$(if $(wildcard $(DEFCONFIG)),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN)
 
 %_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile
 	@mkdir -p $(BUILD_DIR)/buildroot-config
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-12-26 23:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-30 13:57 [Buildroot] [PATCH] Makefile: defconfig: use BR2_DEFCONFIG only when the file exists Fabio Porcedda
2013-05-30 14:01 ` Thomas Petazzoni
2013-05-30 14:25   ` Fabio Porcedda
2013-12-26 23:09     ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox