From 743dc7997aa9f5210055896940d87c88983dcda6 Mon Sep 17 00:00:00 2001 From: Thomas Wood Date: Tue, 22 Jul 2014 14:53:18 +0100 Subject: 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 Cc: Tvrtko Ursulin --- Makefile.am | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'Makefile.am') 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: -- cgit v1.2.3