From patchwork Mon Oct 3 09:57:11 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: 4491 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 303B323F57 for ; Mon, 3 Oct 2011 10:08:50 +0000 (UTC) Received: from mail-dy0-f52.google.com (mail-dy0-f52.google.com [209.85.220.52]) by fiordland.canonical.com (Postfix) with ESMTP id 1B991A181FA for ; Mon, 3 Oct 2011 10:08:50 +0000 (UTC) Received: by dyj10 with SMTP id 10so131798dyj.11 for ; Mon, 03 Oct 2011 03:08:49 -0700 (PDT) Received: by 10.223.55.136 with SMTP id u8mr20679705fag.46.1317636216079; Mon, 03 Oct 2011 03:03:36 -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 n10cs8914laf; Mon, 3 Oct 2011 03:03:35 -0700 (PDT) Received: by 10.223.52.141 with SMTP id i13mr18735008fag.74.1317635853983; Mon, 03 Oct 2011 02:57:33 -0700 (PDT) Received: from pig2.dooz.org (pig2.dooz.org. [88.191.118.219]) by mx.google.com with ESMTPS id c18si6561701faa.131.2011.10.03.02.57.33 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 03 Oct 2011 02:57:33 -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 7D88EC0BE1; Mon, 3 Oct 2011 11:57:33 +0200 (CEST) Received: by bee.dooz.org (Postfix, from userid 1000) id 0974679AC; Mon, 3 Oct 2011 11:57:33 +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 2/3] Safer timestamp_autogenerated.h generation Date: Mon, 3 Oct 2011 11:57:11 +0200 Message-Id: <1317635832-10764-3-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 Generate timestamp_autogenerated.h as safely as version_autogenerated.h. Cc: patches@linaro.org Signed-off-by: Loïc Minier Acked-by: Mike Frysinger --- Makefile | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0892908..2991357 100644 --- a/Makefile +++ b/Makefile @@ -568,8 +568,9 @@ $(VERSION_FILE): $(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"' >> $@ + @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@.tmp + @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@.tmp + @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@ easylogo env gdb: $(MAKE) -C tools/$@ all MTD_VERSION=${MTD_VERSION}