summaryrefslogtreecommitdiff
path: root/lib/Makefile.sources
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2015-07-01 23:40:36 +0100
committerDamien Lespiau <damien.lespiau@intel.com>2015-07-02 11:54:12 +0100
commite5653d5f1d1b349ec320b056d3e6e17008c256a7 (patch)
treea40899fe45400137528f824f068ae84c878670e0 /lib/Makefile.sources
parent0a01a190f6f7b2256d6efdd49018f43023f389dd (diff)
build: Add an option to not use the git hash in version
When developing, it's quite annoying that the version changes every commit, causing the library to be rebuild and every single binary re-linked. Add a config option to skip that. I remember Ville asking for this "feature" as well. v2: Option is now called --disable-git-hash (Thomas) Various spelling mistakes (Thomas) Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Diffstat (limited to 'lib/Makefile.sources')
-rw-r--r--lib/Makefile.sources5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Makefile.sources b/lib/Makefile.sources
index f8a1b928..a19ffd92 100644
--- a/lib/Makefile.sources
+++ b/lib/Makefile.sources
@@ -60,6 +60,10 @@ libintel_tools_la_SOURCES = \
.PHONY: version.h.tmp
+if SKIP_GIT_HASH
+$(IGT_LIB_PATH)/version.h.tmp:
+ @echo '#define IGT_GIT_SHA1 "git"' >> $@
+else
$(IGT_LIB_PATH)/version.h.tmp:
@touch $@
@if test -d $(GPU_TOOLS_PATH)/.git; then \
@@ -73,6 +77,7 @@ $(IGT_LIB_PATH)/version.h.tmp:
else \
echo '#define IGT_GIT_SHA1 "NOT-GIT"' ; \
fi >> $@
+endif # SKIP_GIT_HASH
$(IGT_LIB_PATH)/version.h: $(IGT_LIB_PATH)/version.h.tmp