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 569, Tue Mar 7 04:01:07 2000 UTC revision 1126, Thu Mar 7 21:16:28 2002 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-script  
14    
15  trap 'rm -rf `find . -name $smlfile` $cmfile $listfile $mlscript' 0 1 2 3 15  dulist=''
16    
17    trap 'rm -rf `find . -name $smlfile` $cmfile $listfile' 0 1 2 3 15
18    
19  usage() {  usage() {
20      echo ${thisscript}: $*      echo ${thisscript}: $*
# Line 21  Line 22 
22      exit 1      exit 1
23  }  }
24    
25    while [ $# != 0 ] ; do
26        case $1 in
27        -D*|-U*|-C*)
28            dulist="$dulist $1"
29            shift
30            ;;
31        *)
32            break
33            ;;
34        esac
35    done
36    
37  if [ $# != 3 ] ; then  if [ $# != 3 ] ; then
38      usage wrong number of arguments      usage wrong number of arguments
39  fi  fi
# Line 36  Line 49 
49  EOF  EOF
50    
51  cat >$cmfile <<EOF  cat >$cmfile <<EOF
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 "${cmfile}" of  # (See src/cm/main/cm-boot.sml [function "mlbuild"] to see what's
57     NONE => OS.Process.failure  # going on.)
58   | SOME l => let val s = TextIO.openOut "${listfile}"  $SML $dulist @CMbuild $root $cmfile $heap $listfile $LINK
                  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.success  
    end)  
    handle _ => OS.Process.failure))  
 EOF  
59    
60  if $SML full-cm.cm <$mlscript ; then  exit $?
     $LINK @SMLboot=$listfile $  
 else  
     echo Compilation failed.  
     exit 1  
 fi  

Legend:
Removed from v.569  
changed lines
  Added in v.1126

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