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

SCM Repository

[smlnj] Annotation of /sml/trunk/config/_ml-build
ViewVC logotype

Annotation of /sml/trunk/config/_ml-build

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1261 - (view) (download)

1 : blume 537 #!@SHELL@
2 :    
3 : blume 1261 if [ x${SMLNJ_HOME} = x ] ; then
4 :     BIN_DIR=@BINDIR@
5 :     else
6 :     if [ x${CM_PATHCONFIG} = x ] ; then
7 :     CM_PATHCONFIG=${SMLNJ_HOME}/lib/pathconfig
8 :     export CM_PATHCONFIG
9 :     fi
10 :     BIN_DIR=${SMLNJ_HOME}/bin
11 :     fi
12 : blume 537
13 :     SML=$BIN_DIR/sml
14 :     LINK=$BIN_DIR/.link-sml
15 :    
16 :     thisscript=$0
17 :    
18 :     xx=$$
19 :     smlfile=$xx-export.sml
20 :     cmfile=$xx-export.cm
21 :     listfile=$xx-BOOTLIST
22 :    
23 : blume 692 dulist=''
24 :    
25 : blume 716 trap 'rm -rf `find . -name $smlfile` $cmfile $listfile' 0 1 2 3 15
26 : blume 537
27 :     usage() {
28 :     echo ${thisscript}: $*
29 :     echo Usage: $thisscript root-group main-function heapfile
30 :     exit 1
31 :     }
32 :    
33 : blume 692 while [ $# != 0 ] ; do
34 :     case $1 in
35 : blume 1126 -D*|-U*|-C*)
36 : blume 692 dulist="$dulist $1"
37 :     shift
38 :     ;;
39 :     *)
40 :     break
41 :     ;;
42 :     esac
43 :     done
44 :    
45 : blume 537 if [ $# != 3 ] ; then
46 :     usage wrong number of arguments
47 :     fi
48 :    
49 :     root=$1
50 :     main=$2
51 :     heap=$3
52 :    
53 :     rare=XYZ_XXX_0123
54 :    
55 :     cat >$smlfile <<EOF
56 :     structure ${rare} = struct val _ = SMLofNJ.exportFn ("${heap}", ${main}) end
57 :     EOF
58 :    
59 :     cat >$cmfile <<EOF
60 : blume 644 Group structure ${rare} is \$/basis.cm ${root} ${smlfile}
61 : blume 537 EOF
62 :    
63 : blume 716 # Invoke sml with special option that causes CM to do its magic.
64 :     # (See src/cm/main/cm-boot.sml [function "mlbuild"] to see what's
65 :     # going on.)
66 :     $SML $dulist @CMbuild $root $cmfile $heap $listfile $LINK
67 : blume 537
68 : blume 692 exit $?

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