X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=makedist.sh;h=22b4f5d0aebd7d885ce42ebe903096269f00072c;hb=a0a581c8b5422bf0c5ed3fde6aa25811e4eb89fc;hp=4b30314ac1e6dfe9e2d65aec2cdf0cea472aba35;hpb=05a0cf068498663f0f2e17b9fa19b2188db6e6a7;p=sgt-puzzles.git diff --git a/makedist.sh b/makedist.sh index 4b30314..22b4f5d 100755 --- a/makedist.sh +++ b/makedist.sh @@ -2,33 +2,22 @@ # Build a Unix source distribution from the Puzzles SVN area. # -# Pass a numeric argument to have the archive tagged as that SVN -# revision. Otherwise, the script will work it out itself by -# calling `svnversion', or failing that it will not version-tag the +# Pass a version number argument to have the archive tagged with that +# version number. Otherwise, the script will not version-tag the # archive at all. -case "$#" in - 0) - # Ignore errors; if we can't get a version, we'll have a blank - # string. - rev=`svnversion . 2>/dev/null` - if test "x$rev" = "xexported"; then rev=; fi - ;; - *) - case "$1" in *[!0-9M]*) echo "Malformed revision number '$1'">&2;exit 1;;esac - rev="$1" - ;; -esac - -if test "x$rev" != "x"; then - arcsuffix="-r$rev" - ver="-DREVISION=$rev" +version="$1" + +if test "x$version" != "x"; then + arcsuffix="-$version" + ver="-DVER=$version" else arcsuffix= ver= fi perl mkfiles.pl +./mkauto.sh mkdir tmp.$$ mkdir tmp.$$/puzzles$arcsuffix @@ -41,23 +30,18 @@ halibut --winhelp=puzzles.hlp --text=puzzles.txt puzzles.but halibut --text=HACKING devel.but for i in *.c *.m *.h *.R *.rc *.but *.plist *.icns LICENCE README Recipe \ - mkfiles.pl Makefile Makefile.* \ + *.rc2 mkfiles.pl Makefile Makefile.* \ HACKING puzzles.txt puzzles.hlp puzzles.cnt puzzles.chm \ - icons/Makefile icons/*.{sav,pl,sh} icons/win16pal.xpm \ - icons/*.png icons/*.ico icons/*.rc icons/*.c; do + icons/Makefile icons/*.sav icons/*.pl icons/*.sh icons/win16pal.xpm \ + icons/*.png icons/*.ico icons/*.rc icons/*.c \ + configure.ac mkauto.sh aclocal.m4 \ + configure depcomp install-sh missing compile; do case $i in */*) ln -s ../../../$i tmp.$$/puzzles$arcsuffix/$i;; *) ln -s ../../$i tmp.$$/puzzles$arcsuffix/$i;; esac - if test "x$ver" != "x"; then - md5sum $i >> tmp.$$/puzzles$arcsuffix/manifest - fi done -if test "x$ver" != "x"; then - echo "$ver" >> tmp.$$/puzzles$arcsuffix/version.def -fi - tar -C tmp.$$ -chzf - puzzles$arcsuffix > ../puzzles$arcsuffix.tar.gz rm -rf tmp.$$