Use release_tag.h instead of version_tag.h for snapshots/releases.

Now we publish releases on GitHub, we need to commit the file to the
repository when making a snapshot or release, so we need to use a
different filename to the one that is automatically generated by
'git describe' (which we still want git to ignore).
This commit is contained in:
Martin Whitaker 2025-01-03 12:55:02 +00:00
parent 8cd7bb3584
commit b000a9cf29
1 changed files with 4 additions and 4 deletions

View File

@ -283,7 +283,7 @@ iverilog-vpi.pdf: iverilog-vpi.ps
$(PS2PDF) iverilog-vpi.ps iverilog-vpi.pdf
# For VERSION_TAG in driver/main.c, first try git-describe, then look for a
# version_tag.h file in the source tree (included in snapshots and releases),
# release_tag.h file in the source tree (included in snapshots and releases),
# and finally use nothing.
# "true" and "false" in the next few lines are Unix shell command names
@ -298,9 +298,9 @@ version_tag.h version:
tmp=`(cd $(srcdir) && $(GIT) describe --always --dirty) \
| sed -e 's;\(.*\);#define VERSION_TAG "\1";'`; \
echo "$$tmp" | diff - version_tag.h > /dev/null 2>&1 || echo "$$tmp" > version_tag.h || exit 1; \
elif test -r $(srcdir)/version_tag.h; then \
echo "Using $(srcdir)/version_tag.h for VERSION_TAG"; \
diff $(srcdir)/version_tag.h version_tag.h > /dev/null 2>&1 || cp $(srcdir)/version_tag.h version_tag.h; \
elif test -r $(srcdir)/release_tag.h; then \
echo "Using $(srcdir)/release_tag.h for VERSION_TAG"; \
diff $(srcdir)/release_tag.h version_tag.h > /dev/null 2>&1 || cp $(srcdir)/release_tag.h version_tag.h; \
else \
echo "Using empty VERSION_TAG"; \
echo '#define VERSION_TAG ""' > version_tag.h; \