summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-04-16 09:39:16 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-04-16 09:39:16 +0200
commit239a8523369472c4c6bb9a0649f2eb5977121dbe (patch)
treee217c564fd3e4637a3461ce8ed9307f366c66d89 /common
parent426e6ce2fcab030b59bd9bc71ae169b393d83e50 (diff)
parent55c81081e577922a8d7d0a1d633efb7feb3560d4 (diff)
downloadbarebox-239a8523369472c4c6bb9a0649f2eb5977121dbe.tar.gz
barebox-239a8523369472c4c6bb9a0649f2eb5977121dbe.tar.xz
Merge branch 'work/build-timestamp' into next
Diffstat (limited to 'common')
-rw-r--r--common/Makefile17
-rw-r--r--common/version.c4
2 files changed, 20 insertions, 1 deletions
diff --git a/common/Makefile b/common/Makefile
index 76fe407398..bfde73cd44 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -81,3 +81,20 @@ include/generated/barebox_default_env.h: barebox_default_env$(barebox_default_en
CLEAN_FILES += include/generated/barebox_default_env.h barebox_default_env
CLEAN_FILES += barebox_default_env.gz barebox_default_env.bz2
CLEAN_FILES += barebox_default_env.lzo
+
+# dependencies on generated files need to be listed explicitly
+$(obj)/version.o: include/generated/compile.h
+
+# compile.h changes depending on hostname, generation number, etc,
+# so we regenerate it always.
+# mkcompile_h will make sure to only update the
+# actual file if its content has changed.
+
+ chk_compile.h = :
+ quiet_chk_compile.h = echo ' CHK $@'
+silent_chk_compile.h = :
+include/generated/compile.h: FORCE
+ @$($(quiet)chk_compile.h)
+ $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkcompile_h $@ \
+ "$(UTS_MACHINE)" "$(CC) $(KBUILD_CFLAGS)"
+
diff --git a/common/version.c b/common/version.c
index 0af8ec160a..51a8e7c47d 100644
--- a/common/version.c
+++ b/common/version.c
@@ -1,8 +1,10 @@
#include <common.h>
+#include <generated/compile.h>
#include <generated/utsrelease.h>
const char version_string[] =
- "barebox " UTS_RELEASE " (" __DATE__ " - " __TIME__ ")";
+ "barebox " UTS_RELEASE " " UTS_VERSION "\n";
+
void barebox_banner (void)
{