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/config/_link-sml
ViewVC logotype

View of /sml/trunk/config/_link-sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 537 - (download) (annotate)
Fri Feb 18 17:20:16 2000 UTC (19 years, 6 months ago) by blume
File size: 1751 byte(s)
CM changes: standalone builds, better CMB.make/deliver, general improvements
#!@SHELL@
#
# The standard "link" script for SML/NJ
#

#
# for /bin/ksh, disable reading user's environment file
#
unset ENV

#############################################################################
#
# BEGIN SITE SPECIFIC STUFF
#
#############################################################################

#
# SITE SPECIFIC CONFIGURATION INFO
#

# the path of the directory in which executables (like this file) are kept.
BIN_DIR=@BINDIR@
if [ ! -d "$BIN_DIR" ]; then
    cmddir=`dirname $0`
    case "$cmddir" in
    	/* ) BIN_DIR="$cmddir";;
    	* ) BIN_DIR=`cd $cmddir; pwd` ;;
    esac
fi

# the path of the directory in which the runtime system executables are kept.
RUN_DIR=$BIN_DIR/.run

#
# the following could be replaced with some site specific code
#
ARCH_N_OPSYS=`$BIN_DIR/.arch-n-opsys`
if [ "$?" != "0" ]; then
  echo "$CMD: unable to determine architecture/operating system"
  exit 1
fi
eval $ARCH_N_OPSYS

#############################################################################
#
# END SITE SPECIFIC STUFF
#
#############################################################################

#
# Process command line arguments
#
RUN="$RUN_DIR/run.$ARCH-$OPSYS"
BOOT=""
ARGS=""
while [ "$#" != "0" ]; do
  arg=$1; shift
  case $arg in
    @SMLrun=*)
      RUN=`echo $arg | sed 's/@SMLrun=//'`
      ;;
    @SMLboot=*)
      BOOT=`echo $arg | sed 's/@SMLboot=//'`
      ;;
    @SMLversion)
      echo "$CMD @VERSION@"
      exit 0
      ;;
    *)
      ARGS="$ARGS $arg"
      ;;
  esac
done

if [ ! -x "$RUN" ]; then
    echo "$CMD: cannot find runtime system $RUN"
    exit 1
fi

if [ "$BOOT" = "" ]; then
    echo "@SMLboot=<bootlist> must be specified."
    exit 1
fi

#
# run the sucker!
#
exec $RUN @SMLboot=$BOOT $ARGS

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