From patchwork Mon Feb 2 15:34:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnout Vandecappelle X-Patchwork-Id: 435566 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 60F26140276 for ; Tue, 3 Feb 2015 02:34:58 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id A3B778C571; Mon, 2 Feb 2015 15:34:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pAjDeruSMZMM; Mon, 2 Feb 2015 15:34:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id A6D0C8C54A; Mon, 2 Feb 2015 15:34:56 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 78A261C2268 for ; Mon, 2 Feb 2015 15:34:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7579F93051 for ; Mon, 2 Feb 2015 15:34:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yUDFPMItST8f for ; Mon, 2 Feb 2015 15:34:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from viper.mind.be (132.79-246-81.adsl-static.isp.belgacom.be [81.246.79.132]) by hemlock.osuosl.org (Postfix) with ESMTPS id A580A9304F for ; Mon, 2 Feb 2015 15:34:54 +0000 (UTC) Received: from [172.16.2.6] (helo=vandecaa-laptop) by viper.mind.be with esmtp (Exim 4.69) (envelope-from ) id 1YIJ1Y-0006AL-5G; Mon, 02 Feb 2015 16:34:52 +0100 Received: from arnout by vandecaa-laptop with local (Exim 4.84) (envelope-from ) id 1YIJ1S-000094-LN; Mon, 02 Feb 2015 16:34:46 +0100 From: "Arnout Vandecappelle (Essensium/Mind)" To: buildroot@buildroot.org Date: Mon, 2 Feb 2015 16:34:46 +0100 Message-Id: <1422891286-521-1-git-send-email-arnout@mind.be> X-Mailer: git-send-email 2.1.4 Cc: Thomas De Schampheleire Subject: [Buildroot] [PATCH] %_defconfig: save the path to the defconfig X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" We have the BR2_DEFCONFIG feature that saves the path to the defconfig file that was specified on the command line, so that a later savedefconfig would immediately save to the right location. This wasn't done for the defconfigs in the configs/ directory, however, to avoid accidentally overwriting them. Now we decided that it would be more useful to overwrite the defconfigs in the configs/ directory after all. To do this, we pass the path to that defconfig in the environment. Cc: Thomas De Schampheleire Signed-off-by: Arnout Vandecappelle (Essensium/Mind) Tested-by: Thomas De Schampheleire --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index dd2b7b6..2192efd 100644 --- a/Makefile +++ b/Makefile @@ -781,13 +781,16 @@ defconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile @mkdir -p $(BUILD_DIR)/buildroot-config @$(COMMON_CONFIG_ENV) $< --defconfig$(if $(DEFCONFIG),=$(DEFCONFIG)) $(CONFIG_CONFIG_IN) +# Override the BR2_DEFCONFIG from COMMON_CONFIG_ENV with the new defconfig %_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile @mkdir -p $(BUILD_DIR)/buildroot-config - @$(COMMON_CONFIG_ENV) $< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN) + @$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(TOPDIR)/configs/$@ \ + $< --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) + @$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(BR2_EXTERNAL)/configs/$@ \ + $< --defconfig=$(BR2_EXTERNAL)/configs/$@ $(CONFIG_CONFIG_IN) savedefconfig: $(BUILD_DIR)/buildroot-config/conf outputmakefile @mkdir -p $(BUILD_DIR)/buildroot-config