From 653e2661b2202a2acea91fb2f34256d2f938da72 Mon Sep 17 00:00:00 2001 From: Cary R Date: Fri, 23 May 2008 10:01:54 -0700 Subject: [PATCH] The no git code also check for an existing version.h My previous patch always used an empty file if git was not available. This patch extends this to use the existing version.h file if it exists (snapshot, etc.) --- Makefile.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 3df9bb21b..6bde10e07 100644 --- a/Makefile.in +++ b/Makefile.in @@ -188,7 +188,13 @@ iverilog-vpi.pdf: iverilog-vpi.ps .PHONY: version.h version.h: ifeq ($(GIT),none) - @echo '#define VERSION_TAG ""' > $@; + @if test -r $(srcdir)/$@; then \ + echo "Using $(srcdir)/$@ for VERSION_TAG"; \ + diff $(srcdir)/$@ $@ > /dev/null 2>&1 || cp $(srcdir)/$@ $@; \ + else \ + echo "Using empty VERSION_TAG"; \ + echo '#define VERSION_TAG ""' > $@; \ + fi else @if test -d $(srcdir)/.git; then \ echo "Using git-describe for VERSION_TAG"; \