Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] View of /sml/trunk/system/testml
ViewVC logotype

View of /sml/trunk/system/testml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5794 - (download) (annotate)
Mon Oct 14 16:33:24 2019 UTC (7 months, 2 weeks ago) by jhr
File size: 1407 byte(s)
  porting changes from num64 branch
#!/bin/sh
#
# usage: testml [options]
#
# where options are
#
#	-64 or -32              - specify word size for machines that support both 32
#				  64-bit executables.
#	-load <name>		- specify the prefix of the heap image to load
#
# all other options are passed to runtime system
#


this=$0
cmddir=`dirname $0`
cmddir=`cd $cmddir; pwd`
bindir=`cd $cmddir/../../bin; pwd`

ARGS=""

# for now, we use 32-bits as the default size, but this will change
#
SIZE_OPT="-32"

HEAP_IMAGE=sml

# Process command-line arguments
#
while [ "$#" != "0" ] ; do
    arg=$1; shift
    case $arg in
    -32) SIZE_OPT=$arg ;;
    -64) SIZE_OPT=$arg ;;
    -load)
	if [ "$#" = "0" ]; then
	    echo "$this: missing argument for \"-load\" option"
	    exit 1
	fi
	HEAP_IMAGE="$1"; shift
	;;
    *)
	ARGS="$ARGS $arg"
	;;
    esac
done

#
# use the arch-n-opsys script to determine the ARCH/OS if possible
#
if [ -f $twoup/bin/.arch-n-opsys ]; then
    ARCH_N_OPSYS=`$bindir/.arch-n-opsys $SIZE_OPT`
    if [ "$?" = "0" ]; then
	eval $ARCH_N_OPSYS
    fi
fi

heapdir=`dirname $HEAP_IMAGE`
[ -f "$heapdir/$HEAP_IMAGE.$HEAP_SUFFIX" ] || heapdir="$cmddir/$heapdir"
HEAP_IMAGE=`cd $heapdir; pwd`/$HEAP_IMAGE

LIB_DIR=${HEAP_IMAGE}.lib
LPC=${LIB_DIR}/local_pathconfig

rm -f $LPC
cp ../../config/extrapathconfig $LPC

CM_PATHCONFIG=$LIB_DIR/pathconfig CM_LOCAL_PATHCONFIG=$LPC \
    $bindir/sml $SIZE_OPT @SMLload=$HEAP_IMAGE "$@"

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0