summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorThomas Wood <thomas.wood@intel.com>2014-07-22 14:53:18 +0100
committerThomas Wood <thomas.wood@intel.com>2014-07-23 16:43:05 +0100
commit743dc7997aa9f5210055896940d87c88983dcda6 (patch)
tree493416bfc91a0f8f69e7275a5a93848e0f2dec4a /Makefile.am
parent784344ef8896e47af13fbb4377b020f33ce4c93c (diff)
build: improve version.h generation
Move version.h generation into lib/Makefile.sources so that it can be shared between the Autotools and Android build systems. Also make sure the "updating version.h" message is only displayed when version.h actually changes and remove unnecessary includes of version.h. This also includes changes from Tvrtko Ursulin to prevent a build from within the git repository failing when git is not available. Signed-off-by: Thomas Wood <thomas.wood@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am23
1 files changed, 0 insertions, 23 deletions
diff --git a/Makefile.am b/Makefile.am
index 9949679b..1dacb175 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -37,29 +37,6 @@ endif
MAINTAINERCLEANFILES = ChangeLog INSTALL
-.PHONY: version.h.tmp
-version.h.tmp:
- @touch $@
- @if test -d .git; then \
- if which git > /dev/null; then git log -n 1 --oneline | \
- sed 's/^\([^ ]*\) .*/#define IGT_GIT_SHA1 "g\1"/' \
- >> $@ ; \
- fi \
- else \
- echo '#define IGT_GIT_SHA1 "NOT-GIT"' >> $@ ; \
- fi
-
-version.h: version.h.tmp
- @echo "updating version.h"
- @if ! cmp -s version.h.tmp version.h; then \
- mv version.h.tmp version.h ;\
- else \
- rm version.h.tmp ;\
- fi
-
-BUILT_SOURCES = version.h
-CLEANFILES = version.h version.h.tmp
-
.PHONY: ChangeLog INSTALL
INSTALL: