--- a/Admin/makebin Mon Jan 21 14:48:11 2002 +0100
+++ b/Admin/makebin Mon Jan 21 15:28:34 2002 +0100
@@ -7,7 +7,6 @@
## global settings
-FAKE_BUILD=""
DISTBASE=~/tmp/isadist
TMP="/var/tmp/isabelle-makebin$$"
@@ -24,9 +23,13 @@
function usage()
{
echo
- echo "Usage: $PRG ARCHIVE"
+ echo "Usage: $PRG [OPTIONS] ARCHIVE"
echo
- echo " Make Isabelle logic images for current platform."
+ echo " Options are:"
+ echo " -l include library"
+ echo " -t test run -- no build phase"
+ echo
+ echo " Precompile Isabelle for the current platform."
echo
exit 1
}
@@ -40,6 +43,31 @@
## process command line
+# options
+
+DO_LIBRARY=""
+TEST_RUN=""
+
+while getopts "lt" OPT
+do
+ case "$OPT" in
+ l)
+ DO_LIBRARY=true
+ ;;
+ t)
+ TEST_RUN=true
+ ;;
+ \?)
+ usage
+ ;;
+ esac
+done
+
+shift $(($OPTIND - 1))
+
+
+# args
+
[ "$#" -gt 1 ] && usage
ARCHIVE="$1"; shift
@@ -74,14 +102,19 @@
COMPILER=$(./bin/isatool getenv -b ML_IDENTIFIER)
PLATFORM=$(./bin/isatool getenv -b ML_PLATFORM)
-if [ -n "$FAKE_BUILD" ]; then
- mkdir -p "heaps/$COMPILER"
+if [ -n "$TEST_RUN" ]; then
+ mkdir -p "heaps/$COMPILER/log"
touch "heaps/$COMPILER/HOL"
+ touch "heaps/$COMPILER/log/HOL.gz"
touch "heaps/$COMPILER/HOL-Real"
+ touch "heaps/$COMPILER/log/HOL-Real.gz"
touch "heaps/$COMPILER/ZF"
+ touch "heaps/$COMPILER/log/ZF.gz"
+ mkdir browser_info
else
./build -b -m HOL-Real HOL
./build -b ZF
+ [ -n "$DO_LIBRARY" ] && ./build -bait
rm -f "heaps/$COMPILER/Pure" "heaps/$COMPILER/FOL"
fi
@@ -98,8 +131,13 @@
"$TAR" cf "${IMG}_$PLATFORM.tar" \
"$ISABELLE_NAME/heaps/$COMPILER/$IMG" \
"$ISABELLE_NAME/heaps/$COMPILER/log/$IMG.gz"
- gzip "${IMG}_$PLATFORM.tar"
+ gzip -f "${IMG}_$PLATFORM.tar"
cp -f "${IMG}_$PLATFORM.tar.gz" "$ARCHIVE_DIR"
+
+ if [ -n "$DO_LIBRARY" ]; then
+ "$TAR" cf "${ISABELLE_NAME}_library.tar" $ISABELLE_NAME/browser_info && \
+ gzip -f "${ISABELLE_NAME}_library.tar"
+ fi
done