diff options
author | Joonas Lahtinen <joonas.lahtinen@linux.intel.com> | 2014-12-11 15:11:53 +0200 |
---|---|---|
committer | Thomas Wood <thomas.wood@intel.com> | 2014-12-12 12:18:22 +0000 |
commit | 6414707bdc318a0bed4c3ae2fe404e27f3cd377c (patch) | |
tree | 9f591b01c315fe51ea831e4ae03870a76b67c7f2 /lib/Makefile.sources | |
parent | 42b02c284ed24871528df8f1b3eaad7fe1554fd9 (diff) |
lib: Fix out of tree build of version.h
Write the version.h.tmp file into the build directory instead of source
directory. This allows out of tree building when those two are not the
same.
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Diffstat (limited to 'lib/Makefile.sources')
-rw-r--r-- | lib/Makefile.sources | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Makefile.sources b/lib/Makefile.sources index 819b21a4..34a3d31c 100644 --- a/lib/Makefile.sources +++ b/lib/Makefile.sources @@ -55,16 +55,16 @@ libintel_tools_la_SOURCES = \ $(IGT_LIB_PATH)/version.h.tmp: @touch $@ @if test -d $(GPU_TOOLS_PATH)/.git; then \ - if which git > /dev/null 2>&1; then cd $(@D); \ + if which git > /dev/null 2>&1; then \ + cd $(GPU_TOOLS_PATH); \ git log -n 1 --oneline | \ - sed 's/^\([^ ]*\) .*/#define IGT_GIT_SHA1 "g\1"/' \ - >> $(@F) ; \ + sed 's/^\([^ ]*\) .*/#define IGT_GIT_SHA1 "g\1"/' ; \ else \ - echo '#define IGT_GIT_SHA1 "NO-GIT"' >> $@ ; \ + echo '#define IGT_GIT_SHA1 "NO-GIT"' ; \ fi \ else \ - echo '#define IGT_GIT_SHA1 "NOT-GIT"' >> $@ ; \ - fi + echo '#define IGT_GIT_SHA1 "NOT-GIT"' ; \ + fi >> $@ $(IGT_LIB_PATH)/version.h: $(IGT_LIB_PATH)/version.h.tmp |