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 /sml/trunk/config/_ml-build
ViewVC logotype

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

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

revision 692, Thu Jul 27 08:34:53 2000 UTC revision 716, Sat Nov 4 05:42:35 2000 UTC
# Line 11  Line 11 
11  smlfile=$xx-export.sml  smlfile=$xx-export.sml
12  cmfile=$xx-export.cm  cmfile=$xx-export.cm
13  listfile=$xx-BOOTLIST  listfile=$xx-BOOTLIST
 mlscript=$xx-mlscript.sml  
14    
15  dulist=''  dulist=''
16    
17  trap 'rm -rf `find . -name $smlfile` $cmfile $listfile $mlscript' 0 1 2 3 15  trap 'rm -rf `find . -name $smlfile` $cmfile $listfile' 0 1 2 3 15
18    
19  usage() {  usage() {
20      echo ${thisscript}: $*      echo ${thisscript}: $*
# Line 53  Line 52 
52  Group structure ${rare} is \$/basis.cm ${root} ${smlfile}  Group structure ${rare} is \$/basis.cm ${root} ${smlfile}
53  EOF  EOF
54    
55  cat >$mlscript <<EOF  # Invoke sml with special option that causes CM to do its magic.
56  ignore (OS.Process.exit ((case CM.mk_standalone NONE  # (See src/cm/main/cm-boot.sml [function "mlbuild"] to see what's
57                                     { project = "${root}",  # going on.)
58                                       wrapper = "${cmfile}",  $SML $dulist @CMbuild $root $cmfile $heap $listfile $LINK
                                      target = "$heap" } of  
    NONE => (print "Compilation failed.\n"; OS.Process.failure)  
  | SOME [] => (print "Heap was already up-to-date.\n";  
                OS.Process.success)  
  | SOME l => let val s = TextIO.openOut "${listfile}"  
                  fun wr str = TextIO.output (s, str ^ "\n")  
                  val n = length l  
                  fun maxsz (s, n) = Int.max (size s, n)  
                  val m = foldl maxsz 0 l  
    in wr (concat ["%", Int.toString n, " ", Int.toString m]);  
       app wr l;  
       TextIO.closeOut s;  
       OS.Process.system "${LINK} @SMLboot=${listfile}"  
    end)  
    handle _ => OS.Process.failure))  
 EOF  
   
 # Provide $smlnj/cm.cm as a command-line argument just to be absolutely  
 # sure that structure CM is available. (Under normal circumstances it  
 # is already available -- even without any command line arguments.)  
 $SML '$smlnj/cm.cm' $dulist $mlscript  
59    
60  exit $?  exit $?

Legend:
Removed from v.692  
changed lines
  Added in v.716

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