From patchwork Wed Apr 2 20:05:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Sojka X-Patchwork-Id: 336465 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 9770514012C for ; Thu, 3 Apr 2014 07:11:28 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id CFEDD31A4E; Wed, 2 Apr 2014 20:11:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CXKesdkv4C3K; Wed, 2 Apr 2014 20:11:26 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 392CE31A3C; Wed, 2 Apr 2014 20:11:26 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id A414D1C2431 for ; Wed, 2 Apr 2014 20:11:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 9D0A78C5F7 for ; Wed, 2 Apr 2014 20:11:24 +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 lor90lJNZlQw for ; Wed, 2 Apr 2014 20:11:22 +0000 (UTC) X-Greylist: delayed 00:05:03 by SQLgrey-1.7.6 Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by whitealder.osuosl.org (Postfix) with ESMTP id DD77F8B730 for ; Wed, 2 Apr 2014 20:11:21 +0000 (UTC) Received: from localhost (unknown [192.168.200.7]) by max.feld.cvut.cz (Postfix) with ESMTP id AE6D13CFEA4; Wed, 2 Apr 2014 22:06:16 +0200 (CEST) X-Virus-Scanned: IMAP STYX AMAVIS Received: from max.feld.cvut.cz ([192.168.200.1]) by localhost (styx.feld.cvut.cz [192.168.200.7]) (amavisd-new, port 10044) with ESMTP id q2r3633SK310; Wed, 2 Apr 2014 22:06:11 +0200 (CEST) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by max.feld.cvut.cz (Postfix) with ESMTP id DEC2B3CFEA2; Wed, 2 Apr 2014 22:06:11 +0200 (CEST) Received: from wsh by steelpick.2x.cz with local (Exim 4.82) (envelope-from ) id 1WVRQE-0005en-0W; Wed, 02 Apr 2014 22:06:06 +0200 From: Michal Sojka To: buildroot@busybox.net Date: Wed, 2 Apr 2014 22:05:47 +0200 Message-Id: <1396469147-21713-1-git-send-email-sojka@merica.cz> X-Mailer: git-send-email 1.9.1 Cc: michal.vokac@comap.cz, Michal Sojka Subject: [Buildroot] [PATCH] Rebuild busybox when an external config is updated X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 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-bounces@busybox.net This patch adds dependency of busybox configure target to the configuration file specified with BUSYBOX_CONFIG_FILE variable. This means that the following sequence of commands rebuilds busybox after the busybox.config is changed: make BUSYBOX_CONFIG_FILE=$PWD/busybox.config echo SOME_OPTION=y >> busybox.config make BUSYBOX_CONFIG_FILE=$PWD/busybox.config This behaviour is handy when a per-project busybox config is maintained in another repository and the config gets updated by another user (e.g. after git pull). Without this patch, the last command above does not rebuild busybox. This patch also modifies bysubox-update-config target to preserve the timestamp of "exported" config. This is to ensure, that the following sequence of commands builds busybox only once. make BUSYBOX_CONFIG_FILE=$PWD/busybox.config make BUSYBOX_CONFIG_FILE=$PWD/busybox.config busybox-update-config make BUSYBOX_CONFIG_FILE=$PWD/busybox.config Signed-off-by: Michal Sojka --- package/busybox/busybox.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk index 793ffb9..b9be330 100644 --- a/package/busybox/busybox.mk +++ b/package/busybox/busybox.mk @@ -215,6 +215,8 @@ endef $(eval $(generic-package)) +$(BUSYBOX_TARGET_CONFIGURE): $(BUSYBOX_CONFIG_FILE) + busybox-menuconfig busybox-xconfig busybox-gconfig: busybox-patch $(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) -C $(BUSYBOX_DIR) \ $(subst busybox-,,$@) @@ -222,4 +224,4 @@ busybox-menuconfig busybox-xconfig busybox-gconfig: busybox-patch rm -f $(BUSYBOX_DIR)/.stamp_target_installed busybox-update-config: busybox-configure - cp -f $(BUSYBOX_BUILD_CONFIG) $(BUSYBOX_CONFIG_FILE) + cp -fa $(BUSYBOX_BUILD_CONFIG) $(BUSYBOX_CONFIG_FILE)