[U-Boot] [PATCH v3] Move timestamp and version files into 'generated' subdir

Wolfgang Denk wd at denx.de
Mon Oct 17 22:52:18 CEST 2011


Dear Simon Glass,

In message <1318272919-17706-1-git-send-email-sjg at chromium.org> you wrote:
> 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 at chromium.org>
> ---
> Changes in v2:
> - Remove {timestamp,version}_autogenerated.h from include/.gitignore
> 
> Changes in v3:
> - Rebase to master: a recent commit has tidied up one part of this patch
> 
>  Makefile                                  |    4 ++--
>  arch/arm/cpu/armv7/omap-common/spl.c      |    3 +--
>  arch/arm/cpu/armv7/omap-common/spl_mmc.c  |    3 +--
>  arch/arm/cpu/armv7/omap-common/spl_nand.c |    3 +--
>  drivers/serial/usbtty.h                   |    2 +-
>  include/.gitignore                        |    2 --
>  include/timestamp.h                       |    2 +-
>  include/version.h                         |    2 +-
>  8 files changed, 8 insertions(+), 13 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If in any problem you find yourself doing an immense amount of  work,
the answer can be obtained by simple inspection.


More information about the U-Boot mailing list