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 652, Tue Jun 6 02:14:56 2000 UTC revision 692, Thu Jul 27 08:34:53 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
14  mlscript=$xx-script  mlscript=$xx-mlscript.sml
15    
16    dulist=''
17    
18  trap 'rm -rf `find . -name $smlfile` $cmfile $listfile $mlscript' 0 1 2 3 15  trap 'rm -rf `find . -name $smlfile` $cmfile $listfile $mlscript' 0 1 2 3 15
19    
# Line 21  Line 23 
23      exit 1      exit 1
24  }  }
25    
26    while [ $# != 0 ] ; do
27        case $1 in
28        -D*|-U*)
29            dulist="$dulist $1"
30            shift
31            ;;
32        *)
33            break
34            ;;
35        esac
36    done
37    
38  if [ $# != 3 ] ; then  if [ $# != 3 ] ; then
39      usage wrong number of arguments      usage wrong number of arguments
40  fi  fi
# Line 40  Line 54 
54  EOF  EOF
55    
56  cat >$mlscript <<EOF  cat >$mlscript <<EOF
57  ignore (OS.Process.exit ((case CM.mk_standalone NONE "${cmfile}" of  ignore (OS.Process.exit ((case CM.mk_standalone NONE
58     NONE => OS.Process.failure                                     { project = "${root}",
59                                         wrapper = "${cmfile}",
60                                         target = "$heap" } of
61       NONE => (print "Compilation failed.\n"; OS.Process.failure)
62     | SOME [] => (print "Heap was already up-to-date.\n";
63                   OS.Process.success)
64   | SOME l => let val s = TextIO.openOut "${listfile}"   | SOME l => let val s = TextIO.openOut "${listfile}"
65                   fun wr str = TextIO.output (s, str ^ "\n")                   fun wr str = TextIO.output (s, str ^ "\n")
66                   val n = length l                   val n = length l
# Line 50  Line 69 
69     in wr (concat ["%", Int.toString n, " ", Int.toString m]);     in wr (concat ["%", Int.toString n, " ", Int.toString m]);
70        app wr l;        app wr l;
71        TextIO.closeOut s;        TextIO.closeOut s;
72        OS.Process.success        OS.Process.system "${LINK} @SMLboot=${listfile}"
73     end)     end)
74     handle _ => OS.Process.failure))     handle _ => OS.Process.failure))
75  EOF  EOF
# Line 58  Line 77 
77  # Provide $smlnj/cm.cm as a command-line argument just to be absolutely  # Provide $smlnj/cm.cm as a command-line argument just to be absolutely
78  # sure that structure CM is available. (Under normal circumstances it  # sure that structure CM is available. (Under normal circumstances it
79  # is already available -- even without any command line arguments.)  # is already available -- even without any command line arguments.)
80  if $SML '$smlnj/cm.cm' <$mlscript ; then  $SML '$smlnj/cm.cm' $dulist $mlscript
81      $LINK @SMLboot=$listfile $  
82  else  exit $?
     echo Compilation failed.  
     exit 1  
 fi  

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

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