]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Move timestamp and version files into 'generated' subdir
authorSimon Glass <sjg@chromium.org>
Mon, 10 Oct 2011 08:55:19 +0000 (08:55 +0000)
committerWolfgang Denk <wd@denx.de>
Mon, 17 Oct 2011 21:57:00 +0000 (23:57 +0200)
There is a rather subtle build problem where the build time stamp is not
updated for out-of-tree builds if there exists an in-tree build which
has a valid timestamp file. So if you do an in-tree build, then an
out-of-tree build your timestamp will not change.

The correct timestamp_autogenerated.h lives in the object tree, but it
is not always found there. The source still lives in the source tree and
when compiling version.h, it includes timestamp_autogenerated.h. Since
the current directory is always searched first, this will come from the
source tree rather than the object tree if it exists there. This affects
dependency generation also, which means that common/cmd_version.o will not
even be rebuilt if you have ever done an in-tree build.

A similar problem exists with the version file.

This change moves both files into the 'generated' subdir, which is already
used for asm-offsets.h. Then timestamp.h and version.h are updated to
include the files from there.

There are other places where these generated files are included, but I
cannot see why these don't just use the timestamp.h and version.h headers.
So this change also tidies that up.

I have tested this with in- and out-of-tree builds, but not SPL. I have
looked at various other options for fixing this, including sed on the dep
files, -I- and -include flags to gcc, but I don't think they can be made
to work. Comments welcome.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Makefile
arch/arm/cpu/armv7/omap-common/spl.c
arch/arm/cpu/armv7/omap-common/spl_mmc.c
arch/arm/cpu/armv7/omap-common/spl_nand.c
drivers/serial/usbtty.h
include/.gitignore
include/timestamp.h
include/version.h

index 1c49f30594c2c3de417975aa0fc2b3b034df8861..e9a153cc61ef2f6e3b1fd9fbe220f731338eb52b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -30,8 +30,8 @@ U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 else
 U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL)$(EXTRAVERSION)
 endif
-TIMESTAMP_FILE = $(obj)include/timestamp_autogenerated.h
-VERSION_FILE = $(obj)include/version_autogenerated.h
+TIMESTAMP_FILE = $(obj)include/generated/timestamp_autogenerated.h
+VERSION_FILE = $(obj)include/generated/version_autogenerated.h
 
 HOSTARCH := $(shell uname -m | \
        sed -e s/i.86/x86/ \
index c76fea6188103d1131691750bf51028cfba46c68..01fd58a354f3cd405625f983c1ac83416cb07152 100644 (file)
@@ -29,8 +29,7 @@
 #include <nand.h>
 #include <mmc.h>
 #include <fat.h>
-#include <timestamp_autogenerated.h>
-#include <version_autogenerated.h>
+#include <version.h>
 #include <asm/omap_common.h>
 #include <asm/arch/mmc_host_def.h>
 #include <i2c.h>
index 1d1e50c3c4b5bb03d6275fa179658d2653251921..6f5b43e559f3b80b44b67f90f55844b1d3c12553 100644 (file)
@@ -28,8 +28,7 @@
 #include <asm/arch/sys_proto.h>
 #include <mmc.h>
 #include <fat.h>
-#include <timestamp_autogenerated.h>
-#include <version_autogenerated.h>
+#include <version.h>
 #include <asm/omap_common.h>
 #include <asm/arch/mmc_host_def.h>
 
index af02a595571c4eea509abefde84a6ab72bb06cc2..38d06b1ea8284c840b9e474d8d9cf52776c9e4c1 100644 (file)
@@ -25,8 +25,7 @@
 #include <asm/utils.h>
 #include <asm/arch/sys_proto.h>
 #include <nand.h>
-#include <timestamp_autogenerated.h>
-#include <version_autogenerated.h>
+#include <version.h>
 #include <asm/omap_common.h>
 
 
index a23169a29d5e71ef9b786001f30c834a38ebe53c..14961c1969d3c94adbd5cf621b9a8b76349d3c7c 100644 (file)
@@ -37,7 +37,7 @@
 #include <usb/spr_udc.h>
 #endif
 
-#include <version_autogenerated.h>
+#include <version.h>
 
 /* If no VendorID/ProductID is defined in config.h, pretend to be Linux
  * DO NOT Reuse this Vendor/Product setup with protocol incompatible devices */
index 77594e53ff142b189111e64d2f785c095f80044c..ec224c545c5d0924c4ed71579f3c8dc4557fbea3 100644 (file)
@@ -3,5 +3,3 @@
 /bmp_logo.h
 /config.h
 /config.mk
-/timestamp_autogenerated.h
-/version_autogenerated.h
index b2f4cf4d7b4427f01c4e0023018bff2026eefce0..05a66585732351905b70c93f7b24d386a5a23413 100644 (file)
@@ -24,7 +24,7 @@
 #define        __TIMESTAMP_H__
 
 #ifndef DO_DEPS_ONLY
-#include "timestamp_autogenerated.h"
+#include "generated/timestamp_autogenerated.h"
 #endif
 
 #endif /* __TIMESTAMP_H__ */
index 129acef0b8335f4d4376755ad2ad9910a8bc0004..c908bd30138f49258b29e73cda23b4b8cbd19fc8 100644 (file)
@@ -27,7 +27,7 @@
 #include <timestamp.h>
 
 #ifndef DO_DEPS_ONLY
-#include "version_autogenerated.h"
+#include "generated/version_autogenerated.h"
 #endif
 
 #ifndef CONFIG_IDENT_STRING