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 /config/releases/release-110.66/_ml-build
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1126 - (view) (download)
Original Path: sml/trunk/config/_ml-build

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

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