diff options
| -rw-r--r-- | Buildscr | 4 | ||||
| -rw-r--r-- | Makefile | 15 | ||||
| -rwxr-xr-x | release.sh | 7 | ||||
| -rw-r--r-- | version.c | 10 |
4 files changed, 7 insertions, 29 deletions
@@ -11,6 +11,10 @@ ifneq "$(RELEASE)" "" set Version $(RELEASE) # use perl to avoid inconsistent behaviour of echo '\v' in halibut do perl -e 'print "\n\\versionid Halibut version $$ARGV[0]\n"' $(Version) >> doc/manpage.but +# Write out a version.h that contains the real version number. +in halibut do echo '/* Generated by automated build script */' > version.h +in halibut do echo '$#define VERSION "version $(Version)"' >> version.h + set Rel ifneq "$(RELEASE)" "" set Rel RELEASE=$(RELEASE) @@ -61,9 +61,7 @@ clean: topclean topclean: rm -f *.html output.* *.tar.gz -# Make a release archive. If $(VERSION) is specified, this will -# also contain a `manifest' file which will be used to decide the -# version number automatically. +# Makef a release archive. release: release.sh ./release.sh $(RELDIR) $(VERSION) @@ -78,17 +76,6 @@ CFLAGS += -DLOGALLOC LIBS += -lefence endif -ifndef VER -ifdef VERSION -VER := $(VERSION) -endif -endif -ifdef VER -VDEF = -DVERSION=\"$(VER)\" -else -VDEF = `(cd $(SRC); md5sum -c manifest >/dev/null 2>&1 && cat version)` -endif - all: halibut SRC := ../ @@ -24,13 +24,6 @@ if ! test -d charset; then linkmirror $PWD/../charset reltmp/$RELDIR/charset fi -if test "x${VERSION}y" != "xy"; then - (cd reltmp/$RELDIR; - find . -name '*.[ch]' -exec md5sum {} \; - ) > reltmp/$RELDIR/manifest - echo "-DVERSION=\"${VERSION}\"" > reltmp/$RELDIR/version; -fi - tar chzvoCf reltmp $RELDIR.tar.gz $RELDIR rm -rf reltmp @@ -2,12 +2,6 @@ * version.c: version string */ -#include <stdio.h> +#include "version.h" -#ifndef VERSION -#define VER "anonymous build (" __DATE__ " " __TIME__ ")" -#else -#define VER "version " VERSION -#endif - -const char *const version = VER; +const char *const version = VERSION; |