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

SCM Repository

[smlnj] Diff of /config/releases/release-110.72/_run-sml
ViewVC logotype

Diff of /config/releases/release-110.72/_run-sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

sml/trunk/config/_run-sml revision 937, Thu Sep 20 21:20:28 2001 UTC config/trunk/_run-sml revision 3459, Tue Nov 17 17:02:31 2009 UTC
# Line 3  Line 3 
3  # The standard driver for SML/NJ under the new runtime system  # The standard driver for SML/NJ under the new runtime system
4  #  #
5    
6  CMD=`basename $0`  CMD=`basename "$0"`
7    
8  #  #
9  # for /bin/ksh, disable reading user's environment file  # for /bin/ksh, disable reading user's environment file
# Line 20  Line 20 
20  # SITE SPECIFIC CONFIGURATION INFO  # SITE SPECIFIC CONFIGURATION INFO
21  #  #
22    
23    # On cygwin, make sure SMLNJ_HOME is given a POSIX-style pathname.
24    if [ x"$SMLNJ_HOME" != x ] ; then
25       if [ x"$SMLNJ_CYGWIN_RUNTIME" != x ] ; then
26          if [ "`uname -o`" = "Cygwin" ] ; then
27             # Convert to Unix style, absolute pathname.
28             SMLNJ_HOME=`cygpath -u -a "$SMLNJ_HOME"`
29          fi
30       fi
31    fi
32    
33  # the path of the directory in which executables (like this file) are kept.  # the path of the directory in which executables (like this file) are kept.
34  BIN_DIR=@BINDIR@  if [ x"$SMLNJ_HOME" = x ] ; then
35        BIN_DIR="@BINDIR@"
36  if [ ! -d "$BIN_DIR" ]; then  if [ ! -d "$BIN_DIR" ]; then
37      cmddir=`dirname $0`          cmddir=`dirname "$0"`
38      case "$cmddir" in      case "$cmddir" in
39          /* ) BIN_DIR="$cmddir";;          /* ) BIN_DIR="$cmddir";;
40          * ) BIN_DIR=`cd $cmddir; pwd` ;;          * ) BIN_DIR=`cd $cmddir; pwd` ;;
41      esac      esac
42  fi  fi
43    else
44        if [ x"$CM_PATHCONFIG" = x ] ; then
45            CM_PATHCONFIG=${SMLNJ_HOME}/lib/pathconfig
46            export CM_PATHCONFIG
47        fi
48        BIN_DIR=${SMLNJ_HOME}/bin
49    fi
50    
51  # the path of the directory in which the runtime system executables are kept.  # the path of the directory in which the runtime system executables are kept.
52  RUN_DIR=$BIN_DIR/.run  RUN_DIR=$BIN_DIR/.run
# Line 39  Line 57 
57  #  #
58  # the following could be replaced with some site specific code  # the following could be replaced with some site specific code
59  #  #
60  ARCH_N_OPSYS=`$BIN_DIR/.arch-n-opsys`  ARCH_N_OPSYS=`"$BIN_DIR/.arch-n-opsys"`
61  if [ "$?" != "0" ]; then  if [ "$?" != "0" ]; then
62    echo "$CMD: unable to determine architecture/operating system"    echo "$CMD: unable to determine architecture/operating system"
63    exit 1    exit 1
# Line 53  Line 71 
71  #############################################################################  #############################################################################
72    
73  # special shortcut for frequent use (and for Linux' binfmt)  # special shortcut for frequent use (and for Linux' binfmt)
74  if [ `basename $0` = sml ] ; then  if [ `basename "$0"` = sml ] ; then
75      case "$1" in      case "$1" in
76          /* | ./* | ../* )          /* | ./* | ../* )
77              case "$1" in              case "$1" in
# Line 75  Line 93 
93  #  #
94  while [ "$#" != "0" ]; do  while [ "$#" != "0" ]; do
95    arg=$1    arg=$1
96    case $arg in    case "$arg" in
97      @SMLrun=*)      @SMLrun=*)
98        shift        shift
99        RUN=`echo $arg | sed 's/@SMLrun=//'`        RUN=`echo $arg | sed 's/@SMLrun=//'`
# Line 97  Line 115 
115        echo "$CMD @VERSION@"        echo "$CMD @VERSION@"
116        exit 0        exit 0
117        ;;        ;;
118        @SMLsuffix)
119          echo "$HEAP_SUFFIX"
120          exit 0
121          ;;
122      @SMLalloc=*)      @SMLalloc=*)
123        shift        shift
124        ALLOC=$arg        ALLOC=$arg
# Line 137  Line 159 
159              case $kb in              case $kb in
160                  128)                  128)
161                      # This is the Celeron case.                      # This is the Celeron case.
162                      ALLOC="@SMLalloc=32k"                      # ALLOC="@SMLalloc=32k"
163                        ALLOC="@SMLalloc=64k"
164                      ;;                      ;;
165                  256)                  256)
166                      # Do CPUs like this exist?                      # Do CPUs like this exist?
# Line 186  Line 209 
209  #  #
210  # run the sucker!  # run the sucker!
211  #  #
212  exec $RUN @SMLcmdname=$0 $HEAP $ALLOC "$@"  exec "$RUN" @SMLcmdname="$0" "$HEAP" $ALLOC "$@"

Legend:
Removed from v.937  
changed lines
  Added in v.3459

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