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:
parent
9aa610f489
commit
653e2661b2
|
|
@ -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"; \
|
||||
|
|
|
|||
Loading…
Reference in New Issue