]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - Recipe
Conditionalise the automake git-commit embedding.
[PuTTY.git] / Recipe
diff --git a/Recipe b/Recipe
index 952373f20e25bab0c92335cd431bd5b62d5fef0c..3b2db901b650fe84fa2043cdfacbbb9cd4fa698e 100644 (file)
--- a/Recipe
+++ b/Recipe
 # ------------------------------------------------------------
 # Additional text added verbatim to each individual Makefile.
 
-!cflags am version -DSOURCE_COMMIT=\"`git rev-parse HEAD 2>/dev/null`\"
+!cflags am version
 !begin am
+if AUTO_GIT_COMMIT
 BUILT_SOURCES = empty.h
 CLEANFILES = empty.h
+libversion_a_CFLAGS += -DSOURCE_COMMIT=\"`git --git-dir=$(srcdir)/.git rev-parse HEAD 2>/dev/null`\"
 empty.h: $(allsources)
        echo '/* Empty file touched by automake makefile to force rebuild of version.o */' >$@
-
+endif
 !end
 !begin >empty.h
 /* Empty file touched by automake makefile to force rebuild of version.o */