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/trunk/_run-sml
ViewVC logotype

Diff of /config/trunk/_run-sml

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

sml/trunk/config/_run-sml revision 1368, Sat Sep 13 04:44:43 2003 UTC config/trunk/_run-sml revision 2140, Thu Nov 2 16:20:25 2006 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  if [ x${SMLNJ_HOME} = x ] ; then  if [ x"$SMLNJ_HOME" = x ] ; then
35      BIN_DIR=@BINDIR@      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  else
44      if [ x${CM_PATHCONFIG} = x ] ; then      if [ x"$CM_PATHCONFIG" = x ] ; then
45          CM_PATHCONFIG=${SMLNJ_HOME}/lib/pathconfig          CM_PATHCONFIG=${SMLNJ_HOME}/lib/pathconfig
46          export CM_PATHCONFIG          export CM_PATHCONFIG
47      fi      fi
# Line 47  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 61  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 83  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 195  Line 205 
205  #  #
206  # run the sucker!  # run the sucker!
207  #  #
208  exec $RUN @SMLcmdname=$0 $HEAP $ALLOC "$@"  exec "$RUN" @SMLcmdname="$0" "$HEAP" $ALLOC "$@"

Legend:
Removed from v.1368  
changed lines
  Added in v.2140

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