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

revision 756, Thu Dec 14 16:01:33 2000 UTC revision 1261, Tue Jul 23 15:45:45 2002 UTC
# Line 21  Line 21 
21  #  #
22    
23  # 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.
24    if [ x${SMLNJ_HOME} = x ] ; then
25  BIN_DIR=@BINDIR@  BIN_DIR=@BINDIR@
26  if [ ! -d "$BIN_DIR" ]; then  if [ ! -d "$BIN_DIR" ]; then
27      cmddir=`dirname $0`      cmddir=`dirname $0`
# Line 29  Line 30 
30          * ) BIN_DIR=`cd $cmddir; pwd` ;;          * ) BIN_DIR=`cd $cmddir; pwd` ;;
31      esac      esac
32  fi  fi
33    else
34        if [ x${CM_PATHCONFIG} = x ] ; then
35            CM_PATHCONFIG=${SMLNJ_HOME}/lib/pathconfig
36            export CM_PATHCONFIG
37        fi
38        BIN_DIR=${SMLNJ_HOME}/bin
39    fi
40    
41  # 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.
42  RUN_DIR=$BIN_DIR/.run  RUN_DIR=$BIN_DIR/.run
# Line 53  Line 61 
61  #############################################################################  #############################################################################
62    
63  # special shortcut for frequent use (and for Linux' binfmt)  # special shortcut for frequent use (and for Linux' binfmt)
64    if [ `basename $0` = sml ] ; then
65  case "$1" in  case "$1" in
66      /* | ./* | ../* )      /* | ./* | ../* )
67          case "$1" in          case "$1" in
# Line 65  Line 74 
74          esac          esac
75          ;;          ;;
76  esac  esac
77    fi
78    
79  ALLOC=""  ALLOC=""
80    
81  #  #
82  # Process command line arguments  # Process command line arguments
83  #  #
 ARGS=""  
84  while [ "$#" != "0" ]; do  while [ "$#" != "0" ]; do
85    arg=$1; shift    arg=$1
86    case $arg in    case $arg in
87      @SMLrun=*)      @SMLrun=*)
88          shift
89        RUN=`echo $arg | sed 's/@SMLrun=//'`        RUN=`echo $arg | sed 's/@SMLrun=//'`
90        ;;        ;;
91      @SMLload=*)      @SMLload=*)
92        HEAP=$arg;        shift
93          HEAP=$arg
94        ;;        ;;
95      @SMLappl)      @SMLappl)
96          shift
97        if [ "$#" = "0" ]; then        if [ "$#" = "0" ]; then
98          echo "$CMD: missing argument for @SMLappl option"          echo "$CMD: missing argument for @SMLappl option"
99          exit 1          exit 1
100        fi        fi
101        APPL=$1; shift        APPL=$1
102          shift
103        ;;        ;;
104      @SMLversion)      @SMLversion)
105        echo "$CMD @VERSION@"        echo "$CMD @VERSION@"
106        exit 0        exit 0
107        ;;        ;;
108      @SMLalloc=*)      @SMLalloc=*)
109          shift
110        ALLOC=$arg        ALLOC=$arg
111        ;;        ;;
112      *)      *)
113        ARGS="$ARGS $arg"        break
114        ;;        ;;
115    esac    esac
116  done  done
# Line 180  Line 194 
194  #  #
195  # run the sucker!  # run the sucker!
196  #  #
197  exec $RUN @SMLcmdname=$0 $HEAP $ALLOC $ARGS  exec $RUN @SMLcmdname=$0 $HEAP $ALLOC "$@"

Legend:
Removed from v.756  
changed lines
  Added in v.1261

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