From patchwork Wed May 18 19:25:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Williams X-Patchwork-Id: 623708 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3r941t4WlLz9t6Y for ; Thu, 19 May 2016 05:26:26 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 323CA95941; Wed, 18 May 2016 19:26:25 +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 C9-WKw0wT5I6; Wed, 18 May 2016 19:26:17 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id E719195971; Wed, 18 May 2016 19:26:16 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 018891C0975 for ; Wed, 18 May 2016 19:25:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id F237091E17 for ; Wed, 18 May 2016 19:25:58 +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 rLrMFRhFYSXI for ; Wed, 18 May 2016 19:25:58 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sender163-mail.zoho.com (sender163-mail.zoho.com [74.201.84.163]) by whitealder.osuosl.org (Postfix) with ESMTPS id 5D96791DDD for ; Wed, 18 May 2016 19:25:58 +0000 (UTC) Received: from localhost (32.97.110.52 [32.97.110.52]) by mx.zohomail.com with SMTPS id 1463599556271200.88792542085264; Wed, 18 May 2016 12:25:56 -0700 (PDT) From: Patrick Williams To: buildroot@busybox.net Date: Wed, 18 May 2016 14:25:30 -0500 Message-Id: <1463599530-28752-7-git-send-email-patrick@stwcx.xyz> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1463599530-28752-1-git-send-email-patrick@stwcx.xyz> References: <1463599530-28752-1-git-send-email-patrick@stwcx.xyz> X-ZohoMail: Z_56716065 SPT_1 Z_56716064 SPT_1 SLF_D X-Zoho-Virus-Status: 2 Cc: Patrick Williams Subject: [Buildroot] [PATCH 6/6] Makefile: Fix merge defconfig clobber of .config.old 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" The merged defconfig support was using .config as a temporary file to store the merged defconfig. The result of then running the 'conf' tool is that .config.old contains the contents of the merged defconfig instead of the actual old .config. Place the temporary merged defconfig into $(CONFIG_DIR)/.merge_config instead to prevent this clobbering. Signed-off-by: Patrick Williams --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 2694339..7a675d6 100644 --- a/Makefile +++ b/Makefile @@ -850,9 +850,11 @@ define CREATE_DEFCONFIG_RECIPES $$< --defconfig=$1/$$@ $$(CONFIG_CONFIG_IN) %_defconfig: $$(BUILD_DIR)/buildroot-config/conf $1/%_defconfig.merge outputmakefile - @cd $1 && xargs -a $$@.merge -x -P 1 $$(TOPDIR)/support/kconfig/merge_config.sh -m -O $$(CONFIG_DIR) - @$$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$$(CONFIG_DIR)/.config \ - $$< --defconfig=$$(CONFIG_DIR)/.config $$(CONFIG_CONFIG_IN) + @mkdir $$(CONFIG_DIR)/.merge_config + @cd $1 && xargs -a $$@.merge -x -P 1 $$(TOPDIR)/support/kconfig/merge_config.sh -m -O $$(CONFIG_DIR)/.merge_config + @$$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$$(CONFIG_DIR)/.merge_config/.config \ + $$< --defconfig=$$(CONFIG_DIR)/.merge_config/.config $$(CONFIG_CONFIG_IN) + @rm -rf $$(CONFIG_DIR)/.merge_config endef $(foreach path,$(BR2_DEFCONFIG_PATHS),$(eval $(call CREATE_DEFCONFIG_RECIPES,$(path))))