aboutsummaryrefslogtreecommitdiff
path: root/Buildscr
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2014-09-24 10:33:21 +0000
committerSimon Tatham <anakin@pobox.com>2014-09-24 10:33:21 +0000
commit2ebbdbf2a567c73d75af4f0e04f4f42bfe6d3530 (patch)
treeffba948f9ec31406431f027e96a36a518bba56c6 /Buildscr
parentbc930a121466e0e33b46ff01db0153f5cfb79054 (diff)
downloadpuzzles-2ebbdbf2a567c73d75af4f0e04f4f42bfe6d3530.zip
puzzles-2ebbdbf2a567c73d75af4f0e04f4f42bfe6d3530.tar.gz
puzzles-2ebbdbf2a567c73d75af4f0e04f4f42bfe6d3530.tar.bz2
puzzles-2ebbdbf2a567c73d75af4f0e04f4f42bfe6d3530.tar.xz
Remove dependencies on Subversion.
I'm going through all my projects and reworking them to avoid depending on the monotonic integer-valued source control revision identifier provided by Subversion, so I can migrate everything to git without my builds and versioning breaking. Puzzles's version number is now of the form YYYYMMDD.vvvvvv, where vvvvvv is some string of source control information (currently still the SVN-style "rNNNNN", but free to change in future). The date provides monotonicity between my official automated builds, and the second component is the one I'll be most interested in when people send bug reports. [originally from svn r10263]
Diffstat (limited to '')
-rw-r--r--Buildscr25
1 files changed, 16 insertions, 9 deletions
diff --git a/Buildscr b/Buildscr
index 4d86ba6..947102d 100644
--- a/Buildscr
+++ b/Buildscr
@@ -3,10 +3,17 @@
module puzzles
+set Version $(!builddate).$(vcsid)
+
# Start by substituting the right version number in configure.ac.
-in puzzles do perl -i~ -pe 's/rNNNN/r$(revision)/' configure.ac
+in puzzles do perl -i~ -pe 's/6.66/$(Version)/' configure.ac
in puzzles do rm configure.ac~
+# And put it into the documentation as a versionid.
+# use perl to avoid inconsistent behaviour of echo '\v'
+in puzzles do perl -e 'print "\n\\versionid Simon Tatham'\''s Portable Puzzle Collection, version $$ARGV[0]\n"' $(Version) >> puzzles.but
+in puzzles do perl -e 'print "\n\\versionid Simon Tatham'\''s Portable Puzzle Collection, version $$ARGV[0]\n"' $(Version) >> devel.but
+
# First build some local binaries, to run the icon build.
in puzzles do perl mkfiles.pl -U
in puzzles do make
@@ -28,7 +35,7 @@ in puzzles do ./mkauto.sh
# Build the OS X .dmg archive.
delegate osx
in puzzles do make -f Makefile.osx clean
- in puzzles do make -f Makefile.osx release VER=-DREVISION=$(revision)
+ in puzzles do make -f Makefile.osx release VER=-DVER=$(Version)
return puzzles/Puzzles.dmg
enddelegate
@@ -36,14 +43,14 @@ enddelegate
in puzzles do make -f Makefile.doc clean
in puzzles do make -f Makefile.doc chm
in puzzles do make -f Makefile.doc # build help file for installer
-in puzzles do perl winiss.pl $(revision) gamedesc.txt > puzzles.iss
+in puzzles do perl winiss.pl $(Version) gamedesc.txt > puzzles.iss
delegate windows
# Ignore the poorly controlled return value from HHC, and instead
# just test that the output file was generated.
in puzzles do hhc puzzles.hhp; test -f puzzles.chm
# FIXME: Cygwin alternative?
in puzzles do cmd /c 'vcvars32 & nmake -f Makefile.vc clean'
- in puzzles do cmd /c 'vcvars32 & nmake -f Makefile.vc VER=-DREVISION=$(revision)'
+ in puzzles do cmd /c 'vcvars32 & nmake -f Makefile.vc VER=-DVER=$(Version)'
# Build installer.
in puzzles do iscc puzzles.iss
return puzzles/puzzles.chm
@@ -76,7 +83,7 @@ in puzzles do chmod +x *.exe
#in puzzles do perl wceinf.pl gamedesc.txt > puzzles.inf
#delegate windows
# in puzzles do cmd /c 'wcearmv4 & nmake -f Makefile.wce clean'
-# in puzzles do cmd /c 'wcearmv4 & nmake -f Makefile.wce VER=-DREVISION=$(revision)'
+# in puzzles do cmd /c 'wcearmv4 & nmake -f Makefile.wce VER=-DVER=$(Version)'
# # Nasty piece of sh here which saves the return code from cabwiz,
# # outputs its errors and/or warnings, and then propagates the
# # return code back to bob. If only cabwiz could output to
@@ -107,7 +114,7 @@ in puzzles do zip -j puzzles.zip winbin/*.exe puzzles.chm puzzles.hlp puzzles.cn
# Create the source archive. (That writes the archive into the
# _parent_ directory, so be careful when we deliver it.)
-in puzzles do ./makedist.sh $(revision)
+in puzzles do ./makedist.sh $(Version)
ifneq "$(JAVA_UNFINISHED)" "" in puzzles do perl -i~ -pe 'print "!srcdir unfinished/\n" if /!srcdir icons/' Recipe
ifneq "$(JAVA_UNFINISHED)" "" in puzzles do ln -s unfinished/group.R .
@@ -115,7 +122,7 @@ ifneq "$(JAVA_UNFINISHED)" "" in puzzles do perl mkfiles.pl
# Build the Java applets.
delegate nestedvm
- in puzzles do make -f Makefile.nestedvm NESTEDVM="$$NESTEDVM" VER=-DREVISION=$(revision)
+ in puzzles do make -f Makefile.nestedvm NESTEDVM="$$NESTEDVM" VER=-DVER=$(Version)
return puzzles/*.jar
enddelegate
@@ -134,7 +141,7 @@ in puzzles do echo "AddType application/octet-stream .chm" > .htaccess
in puzzles do echo "AddType application/octet-stream .hlp" >> .htaccess
in puzzles do echo "AddType application/octet-stream .cnt" >> .htaccess
in . do set -- puzzles*.tar.gz; echo RedirectMatch temp '(.*/)'puzzles.tar.gz '$$1'"$$1" >> puzzles/.htaccess
-in puzzles do echo RedirectMatch temp '(.*/)'puzzles-installer.exe '$$1'puzzles-r$(revision)-installer.exe >> .htaccess
+in puzzles do echo RedirectMatch temp '(.*/)'puzzles-installer.exe '$$1'puzzles-$(Version)-installer.exe >> .htaccess
# Phew, we're done. Deliver everything!
deliver puzzles/icons/*-web.png $@
@@ -147,7 +154,7 @@ deliver puzzles/puzzles.chm $@
deliver puzzles/puzzles.hlp $@
deliver puzzles/puzzles.cnt $@
deliver puzzles/puzzles.zip $@
-deliver puzzles/Output/setup.exe puzzles-r$(revision)-installer.exe
+deliver puzzles/Output/setup.exe puzzles-$(Version)-installer.exe
deliver puzzles/*.jar java/$@
deliver puzzles/js/*.js js/$@
deliver puzzles/html/*.html html/$@