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.)
This commit is contained in:
Cary R 2008-05-23 10:01:54 -07:00 committed by Stephen Williams
parent 9aa610f489
commit 653e2661b2
1 changed files with 7 additions and 1 deletions

View File

@ -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"; \