summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2014-09-24 10:32:49 +0000
committerSimon Tatham <anakin@pobox.com>2014-09-24 10:32:49 +0000
commit539919a45dfb039e61e964c43e3da7d7e64ff444 (patch)
tree603638044e69738754a29cd8fd1ff76216b5daf2
parentaa2709b2fdd600b9300c52eb534d13672a572239 (diff)
downloadhalibut-539919a45dfb039e61e964c43e3da7d7e64ff444.zip
halibut-539919a45dfb039e61e964c43e3da7d7e64ff444.tar.gz
halibut-539919a45dfb039e61e964c43e3da7d7e64ff444.tar.bz2
halibut-539919a45dfb039e61e964c43e3da7d7e64ff444.tar.xz
Remove the MD5-based manifest file system.
A long time ago, it seemed like a good idea to arrange that binaries of Halibut would automatically cease to identify themselves as a particular upstream version number if any changes were made to the source code, so that if someone made a local tweak and distributed the result then I wouldn't get blamed for the results. Since then I've decided the whole idea is more trouble than it's worth, so I'm retiring it completely. [originally from svn r10254]
-rw-r--r--Buildscr4
-rw-r--r--Makefile15
-rwxr-xr-xrelease.sh7
-rw-r--r--version.c10
4 files changed, 7 insertions, 29 deletions
diff --git a/Buildscr b/Buildscr
index e90e1e3..d954d1b 100644
--- a/Buildscr
+++ b/Buildscr
@@ -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)
diff --git a/Makefile b/Makefile
index 6af0dc2..3ddce26 100644
--- a/Makefile
+++ b/Makefile
@@ -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 := ../
diff --git a/release.sh b/release.sh
index 6ca76b2..af047b4 100755
--- a/release.sh
+++ b/release.sh
@@ -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
diff --git a/version.c b/version.c
index 38fbca1..1331b2b 100644
--- a/version.c
+++ b/version.c
@@ -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;