mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 08:01:30 -07:00
Files

Makefile.am, and there's a new mkauto.sh which builds a corresponding configure script. The old makefile has been renamed from 'Makefile' to 'Makefile.gtk', indicating that the intended new _default_ approach is to use the autoconf world. Makefile.gtk is provided as an emergency fallback in case anything fails with the new stuff that used to work with it. The new configure script does not support the same $(BINPREFIX) system as the old Makefile did. However, as I understand it, it should be possible to configure using --program-prefix="sgt-" (for example) and then the binaries should all be renamed appropriately at install time. The Makefile.am is quite painful. The Puzzles codebase relies heavily on compiling individual object files multiple times with different the cpp flags per build deliverable (program or library) and not per source file. Solution: anything built with non-default compile options has to go in its own little library. But that doesn't work either in the general case, because as soon as you have more than one such library linked into an application, Unix ld semantics bite you if the objects in the libraries both refer to each other. So I ended up building all those little libraries but not _using_ them - instead the link commands for the programs needing those objects refer to the objects directly, under the silly names that automake gives them. (That's less fragile than it sounds, because it does _document_ the names of the intermediate object files. But still, yuck.) [originally from svn r9886]
65 lines
1.7 KiB
Bash
Executable File
65 lines
1.7 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
# 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
|
|
# 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"
|
|
else
|
|
arcsuffix=
|
|
ver=
|
|
fi
|
|
|
|
perl mkfiles.pl
|
|
|
|
mkdir tmp.$$
|
|
mkdir tmp.$$/puzzles$arcsuffix
|
|
mkdir tmp.$$/puzzles$arcsuffix/icons
|
|
|
|
# Build Windows Help and text versions of the manual for convenience.
|
|
halibut --winhelp=puzzles.hlp --text=puzzles.txt puzzles.but
|
|
|
|
# Build a text version of the HACKING document.
|
|
halibut --text=HACKING devel.but
|
|
|
|
for i in *.c *.m *.h *.R *.rc *.but *.plist *.icns LICENCE README Recipe \
|
|
*.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 \
|
|
configure.ac mkauto.sh aclocal.m4 configure depcomp install-sh missing; 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.$$
|