ALSOSHIP= system.default system.override \
spec.sgml overview.fig overview.ps \
COPYING buildship install-sh .cvsignore
-GENSHIP= lexer.l lexer.c tokens.h pcsum.h \
+GENSHIP= lexer.l lexer.c tokens.h pcsum.h configure config.h.in \
spec.html spec.ps overview.ps
SHIPTARGETS= $(SOURCES) $(ALSOSHIP) $(GENSHIP)
shipprep: $(SHIPTARGETS)
ship: $(SHIPTARGETS)
- rm -rf d && mkdir d && cp -av $^ d
- mv d userv-$(VERSION)
- GZIP=-9v tar zvvcf ../userv-$(VERSION).tar.gz userv-$(VERSION)
- rm -rf userv-$(VERSION)
+ rm -rf shipcheck
+ mkdir shipcheck/userv-$(VERSION)
+ cp -av $^ shipcheck/userv-$(VERSION)
+ GZIP=-9v tar zvvcCf shipcheck userv-$(VERSION).tar.gz userv-$(VERSION)
+ rm -rf shipcheck/userv-$(VERSION)
linecount: $(SOURCES)
wc -l $^
#!/bin/sh
+# to release, check out a fresh copy and then run this
+
+set -e
if test $# = 0
then
- echo >&2 'usage: buildship VERSION=<whatever>'
+ echo >&2 'usage: buildship <version>'
exit 1
fi
+version=$1
+targz=userv-$version.tar.gz
+tag=`echo release-$version | sed -e 's/\./-/g'`
+
+echo >&2 "Tagging (version $version, tag $tag) ..."
+cvs tag -F -c $tag
+
+echo >&2 'Generating pre-built files ...'
autoconf
autoheader
./configure
-make ship "$@"
+make ship VERSION=$version
+
+cd shipcheck
+
+echo >&2 'Checking whether identical to repository version ...'
+tar zxf $targz
+cvs co -r $tag userv
+cp userv-$version/* userv/.
+cd userv
+if test "x`cvs -n update`" != x
+then
+ echo >&2 mismatch:
+ cvs -n update
+ exit 1
+fi
+cd ..
+rm -rf userv
+
+echo >&2 'Doing test build ...'
+cd userv-$version
+./configure
+make
+
+cd ../..
+
+echo >&2 "OK. Distribution file is ../$targz."
+mv -f shipcheck/$targz ..