SCM Repository
View of /sml/trunk/src/system/fixpt
Parent Directory
|
Revision Log
Revision 651 -
(download)
(annotate)
Thu Jun 1 18:34:03 2000 UTC (20 years, 10 months ago) by monnier
File size: 2115 byte(s)
Thu Jun 1 18:34:03 2000 UTC (20 years, 10 months ago) by monnier
File size: 2115 byte(s)
bring revisions from the vendor branch to the trunk
#!/bin/sh # fixpt # - to be run in src/system to iterate compilation to a fixed point # - assumes no sml.boot... directory in src/system (but uses it if it # is there and the base is set to "sml" -- which is the default) # - assumes that ../../bin/sml and ../../bin/.arch-n-opsys have been installed this=$0 here=`pwd` cd ../.. twoup=`pwd` cd $here SML=$twoup/bin/sml ARCH=sparc # # use the arch-n-opsys script to determine the ARCH/OS if possible # if [ -f $twoup/bin/.arch-n-opsys ]; then ARCH_N_OPSYS=`$twoup/bin/.arch-n-opsys` if [ "$?" = "0" ]; then eval $ARCH_N_OPSYS echo Architecture: $ARCH fi fi BIN=.bin.$ARCH-unix BOOT=.boot.$ARCH-unix ITER=3 BASE=sml REBUILD="-rebuild" SETLIGHT="" # # Function to do one round of compilation to get the initial set of binfiles. # (The funky ML comment is there to un-confuse emacs fontlock mode. :) # initcompile() { $SML '$smlnj/cmb.cm' <<EOF local open OS.Process CMB in $SETLIGHT val _ = exit (if make' (SOME "$BASE") then success else failure) (* ' *) end EOF } # # Parse command line # while [ "$#" != 0 ] ; do arg=$1; shift case $arg in -iter) if [ "$#" = 0 ] ; then echo "$this: missing argument for \"-iter\" option" exit 2 fi ITER=$1; shift ;; -base) if [ "$#" = 0 ] ; then echo "$this: missing argument for \"-base\" option" exit 2 fi BASE=$1; shift ;; -light) REBUILD="-lightrebuild" SETLIGHT='val _ = #set (CMB.symval "LIGHT") (SOME 1);' ;; *) echo "$this: unknown argument \"$arg\"" exit 2 ;; esac done iter=0 iterbase=$BASE if initcompile ; then while [ $iter -lt $ITER ] ; do prev=$iter prevbase=$iterbase iter=`expr $iter + 1` iterbase=$BASE$iter if ./makeml -boot $prevbase$BOOT $REBUILD $iterbase ; then if diff -r $prevbase$BIN $iterbase$BIN >/dev/null 2>&1 ; then echo "$this: fixpoint reached in round $iter" exit 0 fi else echo "$this: compilation failed in round $iter" exit 3 fi done else echo "$this: initial compilation failed" exit 3 fi echo "$this: no fixpoint reached after $iter rounds" exit 1
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |