From patchwork Mon Oct 3 09:57:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: loic.minier@linaro.org X-Patchwork-Id: 4492 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id E496823EF9 for ; Mon, 3 Oct 2011 10:14:54 +0000 (UTC) Received: from mail-ww0-f48.google.com (mail-ww0-f48.google.com [74.125.82.48]) by fiordland.canonical.com (Postfix) with ESMTP id D3CDCA181FA for ; Mon, 3 Oct 2011 10:14:54 +0000 (UTC) Received: by wwe32 with SMTP id 32so4336702wwe.17 for ; Mon, 03 Oct 2011 03:14:54 -0700 (PDT) Received: by 10.223.26.26 with SMTP id b26mr5880000fac.122.1317636153452; Mon, 03 Oct 2011 03:02:33 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.23.170 with SMTP id n10cs8874laf; Mon, 3 Oct 2011 03:02:33 -0700 (PDT) Received: by 10.223.41.87 with SMTP id n23mr6104100fae.78.1317635849861; Mon, 03 Oct 2011 02:57:29 -0700 (PDT) Received: from pig2.dooz.org (pig2.dooz.org. [88.191.118.219]) by mx.google.com with ESMTPS id 26si6576312fay.19.2011.10.03.02.57.29 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 03 Oct 2011 02:57:29 -0700 (PDT) Received-SPF: pass (google.com: domain of lool@bee.dooz.org designates 88.191.118.219 as permitted sender) client-ip=88.191.118.219; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lool@bee.dooz.org designates 88.191.118.219 as permitted sender) smtp.mail=lool@bee.dooz.org Received: from bee.dooz.org (unknown [IPv6:2a01:e35:8a6e:5e80:224:7eff:fe14:65c3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "bee.dooz.org", Issuer "dooz.org CA" (verified OK)) by pig2.dooz.org (Postfix) with ESMTPS id B0D5CC0B65; Mon, 3 Oct 2011 11:57:28 +0200 (CEST) Received: by bee.dooz.org (Postfix, from userid 1000) id 36C1179AC; Mon, 3 Oct 2011 11:57:28 +0200 (CEST) From: =?UTF-8?q?Lo=C3=AFc=20Minier?= To: u-boot@lists.denx.de Cc: =?UTF-8?q?Lo=C3=AFc=20Minier?= , patches@linaro.org Subject: [PATCH 1/3] Build timestamp_autogenerated.h without config Date: Mon, 3 Oct 2011 11:57:10 +0200 Message-Id: <1317635832-10764-2-git-send-email-loic.minier@linaro.org> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1317635832-10764-1-git-send-email-loic.minier@linaro.org> References: <1317635832-10764-1-git-send-email-loic.minier@linaro.org> MIME-Version: 1.0 Tools such as mkimage include version information but are config-agnostic; build timestamp_autogenerated.h even when config.mk isn't generated to fix "make tools" build failure: gcc [...] -o mkimage.o mkimage.c -c In file included from include/version.h:27:0, from mkimage.c:26: include/timestamp.h:27:37: fatal error: timestamp_autogenerated.h: No such file or directory Cc: patches@linaro.org Signed-off-by: Loïc Minier Acked-by: Mike Frysinger --- Makefile | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 77140eb..0892908 100644 --- a/Makefile +++ b/Makefile @@ -141,7 +141,7 @@ SUBDIRS = tools \ examples/standalone \ examples/api -.PHONY : $(SUBDIRS) $(VERSION_FILE) +.PHONY : $(SUBDIRS) $(VERSION_FILE) $(TIMESTAMP_FILE) ifeq ($(obj)include/config.mk,$(wildcard $(obj)include/config.mk)) @@ -294,7 +294,7 @@ LIBS += $(CPUDIR)/s5p-common/libs5p-common.o endif LIBS := $(addprefix $(obj),$(sort $(LIBS))) -.PHONY : $(LIBS) $(TIMESTAMP_FILE) +.PHONY : $(LIBS) LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).o LIBBOARD := $(addprefix $(obj),$(LIBBOARD)) @@ -453,10 +453,6 @@ $(obj)mmc_spl/u-boot-mmc-spl.bin: mmc_spl $(obj)spl/u-boot-spl.bin: depend $(MAKE) -C spl all -$(TIMESTAMP_FILE): - @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@ - @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@ - updater: $(MAKE) -C tools/updater all @@ -547,12 +543,12 @@ $(obj)$(CPUDIR)/$(SOC)/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) \ +$(filter-out tools,$(SUBDIRS)) \ updater depend dep tags ctags etags cscope $(obj)System.map: @echo "System not configured - see README" >&2 @ exit 1 -tools: $(VERSION_FILE) +tools: $(VERSION_FILE) $(TIMESTAMP_FILE) $(MAKE) -C $@ all endif # config.mk @@ -570,11 +566,16 @@ $(VERSION_FILE): '$(shell $(LD) -v | head -n 1)' )>> $@.tmp @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@ +$(TIMESTAMP_FILE): + @mkdir -p $(dir $(TIMESTAMP_FILE)) + @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@ + @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@ + easylogo env gdb: $(MAKE) -C tools/$@ all MTD_VERSION=${MTD_VERSION} gdbtools: gdb -tools-all: easylogo env gdb $(VERSION_FILE) +tools-all: easylogo env gdb $(VERSION_FILE) $(TIMESTAMP_FILE) $(MAKE) -C tools HOST_TOOLS_ALL=y .PHONY : CHANGELOG