Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Fabio Porcedda <fabio.porcedda@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] Makefile: defconfig: use BR2_DEFCONFIG only when the file exists
Date: Thu, 30 May 2013 15:57:40 +0200	[thread overview]
Message-ID: <1369922260-8237-1-git-send-email-fabio.porcedda@gmail.com> (raw)

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

             reply	other threads:[~2013-05-30 13:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30 13:57 Fabio Porcedda [this message]
2013-05-30 14:01 ` [Buildroot] [PATCH] Makefile: defconfig: use BR2_DEFCONFIG only when the file exists Thomas Petazzoni
2013-05-30 14:25   ` Fabio Porcedda
2013-12-26 23:09     ` Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1369922260-8237-1-git-send-email-fabio.porcedda@gmail.com \
    --to=fabio.porcedda@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox