# Utility to set up the MIT/GNU Scheme build directories.
# The working directory must be the top-level source directory.
-set -e
+set -eu
: ${MIT_SCHEME_EXE:=mit-scheme}
+configure=done
+
+clean ()
+{
+ if [ "x${configure}" != xdone ]; then
+ rm -f configure
+ fi
+}
+
+trap clean EXIT INT TERM
+
# Please keep the following messages synchronized with the messages in
# these files:
#
fi
if [ ! -x configure ]; then
+ configure=clean
echo "autoconf"
autoconf --include=microcode
+ configure=done
fi
. etc/functions.sh
for SUBDIR in ${INSTALLED_SUBDIRS} ${OTHER_SUBDIRS}; do
echo "setting up ${SUBDIR}"
maybe_link ${SUBDIR}/Setup.sh ../etc/Setup.sh
- (cd ${SUBDIR} && ./Setup.sh "$@")
+ (cd ${SUBDIR} && ./Setup.sh ${@:+"${@}"})
done
# Utility to set up the MIT/GNU Scheme compiler directory.
# The working directory must be the compiler directory.
-set -e
+set -eu
. ../etc/functions.sh
-../etc/Setup.sh "${@}"
+../etc/Setup.sh ${@:+"${@}"}
for N in 1 2 3; do
maybe_link machines/vax/dinstr${N}.scm instr${N}.scm
# Utility to set up an MIT/GNU Scheme build directory.
# The working directory must be the build directory.
-set -e
+set -eu
. ../etc/functions.sh
# Program to set up MIT/GNU Scheme microcode from CVS for distribution.
# Requires `gcc' and `scheme'.
-set -e
+set -eu
+
+autoheader=done
+autoconf=done
+makeinit=done
+
+clean ()
+{
+ if [ "x${autoheader}" != xdone ]; then
+ rm -f config.h.in
+ fi
+ if [ "x${autoconf}" != xdone ]; then
+ rm -f configure
+ fi
+ if [ "x${makeinit}" != xdone ]; then
+ rm -f Makefile.deps Makefile.in
+ fi
+}
+
+trap clean EXIT INT TERM
if [ ! -f config.h.in ]; then
+ autoheader=clean
echo "autoheader"
autoheader
+ autoheader=done
fi
if [ ! -x configure ]; then
+ autoconf=clean
echo "autoconf"
autoconf
+ autoconf=done
fi
-( cd cmpauxmd && make "${@}" )
+( cd cmpauxmd && make ${@:+"${@}"} )
if [ ! -f Makefile.in ]; then
- makegen/makeinit.sh "${@}"
+ makeinit=clean
+ makegen/makeinit.sh ${@:+"${@}"}
+ makeinit=done
fi