From: Taylor R Campbell Date: Mon, 15 Feb 2010 23:12:30 +0000 (-0500) Subject: In microcode/makegen/makeinit.sh, delete Makefile.in on ^C. X-Git-Tag: 20100708-Gtk~166 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=330d1eea40cb5e90be10dd113a3b3aa85fbea650;p=mit-scheme.git In microcode/makegen/makeinit.sh, delete Makefile.in on ^C. This reduces the damage to the tree caused by an inopportune ^C during Setup.sh which would otherwise require manual intervention to clean up the mess. --- diff --git a/src/microcode/makegen/makeinit.sh b/src/microcode/makegen/makeinit.sh index e77ea3360..8ac46efdf 100755 --- a/src/microcode/makegen/makeinit.sh +++ b/src/microcode/makegen/makeinit.sh @@ -25,13 +25,28 @@ # Script to create "Makefile.in". # Requires `gcc' and `scheme'. -# generate "config.h". -[ -f Makefile.in ] || touch Makefile.in +# We make an empty Makefile.in for the sake of spoofing the configure +# script, but we don't want to leave it around in case anything fails. + +clean_makefile=yes + +clean () +{ + if [ "${clean_makefile}" = yes ]; then + rm -f Makefile.in + fi +} + +trap clean EXIT SIGINT SIGQUIT SIGTERM + +# Generate "config.h". + +touch Makefile.in ./configure --disable-native-code "$@" -# Generate "Makefile.in" from "Makefile.in.in". Requires "config.h", -# because dependencies are generated by running GCC -M on the source -# files, which refer to "config.h". +# Generate the real "Makefile.in" from "Makefile.in.in". Requires +# "config.h", because dependencies are generated by running GCC -M on +# the source files, which refer to "config.h". ${MIT_SCHEME_EXE:=mit-scheme} <