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.66/_ml-build
ViewVC logotype

Diff of /config/releases/release-110.66/_ml-build

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

sml/trunk/config/_ml-build revision 1480, Fri Apr 23 15:37:52 2004 UTC config/trunk/_ml-build revision 2330, Mon Feb 12 21:05:27 2007 UTC
# Line 1  Line 1 
1  #!@SHELL@  #!@SHELL@
2    
3  if [ x${SMLNJ_HOME} = x ] ; then  if [ x${SMLNJ_HOME} = x ] ; then
4      BIN_DIR=@BINDIR@      BIN_DIR="@BINDIR@"
5        LIB_DIR="@LIBDIR@"
6  else  else
     if [ x${CM_PATHCONFIG} = x ] ; then  
         CM_PATHCONFIG=${SMLNJ_HOME}/lib/pathconfig  
         export CM_PATHCONFIG  
     fi  
7      BIN_DIR=${SMLNJ_HOME}/bin      BIN_DIR=${SMLNJ_HOME}/bin
8        LIB_DIR=${SMLNJ_HOME}/lib
9    fi
10    
11    if [ x"$CM_PATHCONFIG" = x ] ; then
12        CM_PATHCONFIG=${LIB_DIR}/pathconfig
13        export CM_PATHCONFIG
14  fi  fi
15    
16  SML=$BIN_DIR/sml  SML=$BIN_DIR/sml
# Line 23  Line 26 
26    
27  dulist=''  dulist=''
28    
29  trap 'rm -rf $smlfile $cmfile $listfile $linkargsfile' 0 1 2 3 15  trap 'rm -rf $smlfile $cmfile $listfile $linkargsfile @CMDIRARC@/*/$smlfile' 0 1 2 3 15
30    
31  usage() {  usage() {
32      echo ${thisscript}: $*      echo ${thisscript}: $*
33      echo Usage: $thisscript root-group main-function heapfile      echo Usage: $thisscript '[-S setup] root-group [main-function [heapfile]]'
34      exit 1      exit 1
35  }  }
36    
37    setup=
38    
39  while [ $# != 0 ] ; do  while [ $# != 0 ] ; do
40      case $1 in      case $1 in
41      -D*|-U*|-C*)      -D*|-U*|-C*)
42          dulist="$dulist $1"          dulist="$dulist $1"
43          shift          shift
44          ;;          ;;
45        -S)
46            shift
47            if [ $# = 0 ] ; then
48                usage missing argument for -S
49            fi
50            setup=$1
51            shift
52            ;;
53      *)      *)
54          break          break
55          ;;          ;;
56      esac      esac
57  done  done
58    
59  if [ $# != 3 ] ; then  if [ $# = 4 ] ; then
60      usage wrong number of arguments      setup=$1
61  fi      root=$2
62        main=$3
63        heap=$4
64    elif [ $# = 3 ] ; then
65  root=$1  root=$1
66  main=$2  main=$2
67  heap=$3  heap=$3
68    elif [ $# = 2 ] ; then
69        root=$1
70        main=$2
71        heap=`basename "$root" .cm`
72    elif [ $# = 1 ] ; then
73        root=$1
74        # quick hack for now:
75        main=Test.main
76        heap=`basename "$root" .cm`
77    else
78        usage no CM description file specified
79    fi
80    
81  rare=XYZ_XXX_0123  rare=XYZ_XXX_0123
82    
# Line 65  Line 92 
92  # Unless the heap image exists and is up-to-date CM will write the arguments  # Unless the heap image exists and is up-to-date CM will write the arguments
93  # for the link script into $linkargsfile.  # for the link script into $linkargsfile.
94  # (See src/cm/main/cm-boot.sml [function "mlbuild"] for details.)  # (See src/cm/main/cm-boot.sml [function "mlbuild"] for details.)
95  if $SML $dulist @CMbuild $root $cmfile $heap $listfile $linkargsfile ; then  if "$SML" $dulist @CMbuild $setup "$root" "$cmfile" "$heap" "$listfile" "$linkargsfile"
96      if [ -r $linkargsfile ]; then  then
97          $LINK `cat $linkargsfile`      if [ -r "$linkargsfile" ]; then
98            "$LINK" `cat "$linkargsfile"`
99      fi      fi
100  else  else
101      exit $?      exit $?

Legend:
Removed from v.1480  
changed lines
  Added in v.2330

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