From patchwork Mon Jun 20 22:45:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Yanok X-Patchwork-Id: 101224 X-Patchwork-Delegate: wd@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id E08DAB6F6B for ; Tue, 21 Jun 2011 08:52:00 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8099D280B2; Tue, 21 Jun 2011 00:51:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kwDYbOVY3EPh; Tue, 21 Jun 2011 00:51:42 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C8082280A0; Tue, 21 Jun 2011 00:51:29 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1850228088 for ; Tue, 21 Jun 2011 00:51:25 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hF9HehgnvfAa for ; Tue, 21 Jun 2011 00:51:23 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from pollux.denx.de (host-82-135-33-74.customer.m-online.net [82.135.33.74]) by theia.denx.de (Postfix) with ESMTP id 59E2728089 for ; Tue, 21 Jun 2011 00:51:21 +0200 (CEST) Received: by pollux.denx.de (Postfix, from userid 547) id 673F8201E; Tue, 21 Jun 2011 00:45:45 +0200 (CEST) From: Ilya Yanok To: u-boot@lists.denx.de Date: Tue, 21 Jun 2011 00:45:38 +0200 Message-Id: <1308609939-23337-2-git-send-email-yanok@emcraft.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1308609939-23337-1-git-send-email-yanok@emcraft.com> References: <1308609939-23337-1-git-send-email-yanok@emcraft.com> Cc: Ilya Yanok Subject: [U-Boot] [PATCH 2/3] Makefile: move $(VERSION_FILE) rule out of ifeq configured X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de mkimage relies on autogenerated version so we need to move $(VERSION_FILE) rule out of ifeq and make tools rule depend on it to be able to run 'make tools' from the unconfigured tree. Signed-off-by: Ilya Yanok Acked-by: Mike Frysinger --- Makefile | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index e73cfc7..f264c0c 100644 --- a/Makefile +++ b/Makefile @@ -140,7 +140,7 @@ SUBDIRS = tools \ examples/standalone \ examples/api -.PHONY : $(SUBDIRS) +.PHONY : $(SUBDIRS) $(VERSION_FILE) ifeq ($(obj)include/config.mk,$(wildcard $(obj)include/config.mk)) @@ -293,7 +293,7 @@ LIBS += $(CPUDIR)/s5p-common/libs5p-common.o endif LIBS := $(addprefix $(obj),$(sort $(LIBS))) -.PHONY : $(LIBS) $(TIMESTAMP_FILE) $(VERSION_FILE) +.PHONY : $(LIBS) $(TIMESTAMP_FILE) LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).o LIBBOARD := $(addprefix $(obj),$(LIBBOARD)) @@ -452,19 +452,6 @@ mmc_spl: $(TIMESTAMP_FILE) $(VERSION_FILE) depend $(obj)mmc_spl/u-boot-mmc-spl.bin: mmc_spl -$(VERSION_FILE): - @( localvers='$(shell $(TOPDIR)/tools/setlocalversion $(TOPDIR))' ; \ - printf '#define PLAIN_VERSION "%s%s"\n' \ - "$(U_BOOT_VERSION)" "$${localvers}" ; \ - printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' \ - "$(U_BOOT_VERSION)" "$${localvers}" ; \ - ) > $@.tmp - @( printf '#define CC_VERSION_STRING "%s"\n' \ - '$(shell $(CC) --version | head -n 1)' )>> $@.tmp - @( printf '#define LD_VERSION_STRING "%s"\n' \ - '$(shell $(LD) -v | head -n 1)' )>> $@.tmp - @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@ - $(TIMESTAMP_FILE): @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@ @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@ @@ -539,20 +526,33 @@ $(obj)lib/asm-offsets.s: $(obj)include/autoconf.mk.dep \ else # !config.mk all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \ $(obj)u-boot.img $(obj)u-boot.dis $(obj)u-boot \ -$(filter-out tools,$(SUBDIRS)) $(TIMESTAMP_FILE) $(VERSION_FILE) \ +$(filter-out tools,$(SUBDIRS)) $(TIMESTAMP_FILE) \ updater depend dep tags ctags etags cscope $(obj)System.map: @echo "System not configured - see README" >&2 @ exit 1 -tools: +tools: $(VERSION_FILE) $(MAKE) -C $@ all endif # config.mk +$(VERSION_FILE): + @( localvers='$(shell $(TOPDIR)/tools/setlocalversion $(TOPDIR))' ; \ + printf '#define PLAIN_VERSION "%s%s"\n' \ + "$(U_BOOT_VERSION)" "$${localvers}" ; \ + printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' \ + "$(U_BOOT_VERSION)" "$${localvers}" ; \ + ) > $@.tmp + @( printf '#define CC_VERSION_STRING "%s"\n' \ + '$(shell $(CC) --version | head -n 1)' )>> $@.tmp + @( printf '#define LD_VERSION_STRING "%s"\n' \ + '$(shell $(LD) -v | head -n 1)' )>> $@.tmp + @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@ + easylogo env gdb: $(MAKE) -C tools/$@ all MTD_VERSION=${MTD_VERSION} gdbtools: gdb -tools-all: easylogo env gdb +tools-all: easylogo env gdb $(VERSION_FILE) $(MAKE) -C tools HOST_TOOLS_ALL=y .PHONY : CHANGELOG