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/src/ml-yacc/build
ViewVC logotype

View of /sml/trunk/src/ml-yacc/build

Parent Directory Parent Directory | Revision Log Revision Log


Revision 489 - (download) (annotate)
Tue Nov 23 12:55:00 1999 UTC (19 years, 4 months ago) by monnier
File size: 1371 byte(s)
somewhat functional
#!/bin/sh
#
# build script for ml-yacc under the new runtime system.
#
# options:
#   -arch arch		-- specify the architecture, "heap" is the default.
#   -o image		-- specify the name of the heap image, "ml-lex.ARCH"
#			   is the default.
#   -sml path		-- specify the path to the sml executable, "../../bin/sml"
#			   is the default.

CMD="build"

ROOT="ml-yacc"
HEAP_IMAGE=""
BIN="${INSTALLDIR:-../..}/bin"
# sml is used after "cd src"
SML="$BIN/sml"

#
# determine the host architecture
#
ARCH_N_OPSYS=`$BIN/.arch-n-opsys`
if [ $? != "0" ]; then
  echo "$CMD: unable to determine architecture/operating system"
  exit 1
fi
eval $ARCH_N_OPSYS

#
# process command-line options
#
ARGS=""
while [ "$#" != "0" ]
do
    arg=$1
    shift
    case $arg in
	-arch)
	    if [ "$#" = "0" ]; then
		echo "$CMD: must supply architecture for -arch option"
		exit 1
	    fi
	    ARCH=$1; shift
	;;
	-o)
	    if [ "$#" = "0" ]; then
		echo "$CMD: must supply image name for -o option"
		exit 1
	    fi
	    HEAP_IMAGE=$1; shift
	;;
	-sml)
	    if [ "$#" = "0" ]; then
		echo "$CMD: must supply path for -sml option"
		exit 1
	    fi
	    SML=$1; shift
	;;
	*)
	    ARGS="$ARGS $arg"
	;;
    esac
done

if [ "$HEAP_IMAGE" = "" ]; then
    HEAP_IMAGE="$ROOT"
fi

cd src
$SML $ARGS <<ZZZ
  use "load";
  use "export-yacc.sml";
  ExportParseGen.export "$HEAP_IMAGE" : unit;
ZZZ
cd ..


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