home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-07-28 | 2.6 KB | 86 lines | [TEXT/Moml] |
- (* make_mosml.sml *)
- (* 23Jul97 e -- 142 *)
-
- load "Path";
- load "Process";
-
- val home =
- case Process.getEnv "PATH_TRANSLATED" of
- SOME n => Path.dir n
- | NONE => ":"
- ;
-
- (* requires copyrelease.sml *)
-
- use (home ^ "e_SML:copyrelease.sml");
-
- clean_dir_bin (home ^ "src:mosmllib:");
- clean_dir_bin (home ^ "src:compiler:");
- clean_dir_bin (home ^ "src:lex:");
- clean_dir_bin (home ^ "src:toolssrc:");
-
- moolevel := 2;
-
- (* to compile the toplevel mosml image and the lexer *)
-
- let val base = home ^ "src:"
- in
- valuepoly := false;
- make "none" (base ^ "mosmllib") [] (base ^ "mosmllib");
- valuepoly := true;
- make "none" (base ^ "mosmllib") [] (base ^ "compiler");
- make "none" (base ^ "mosmllib") [(base ^ "compiler")] (base ^ "toolssrc");
- make "none" (base ^ "mosmllib") [(base ^ "compiler")] (base ^ "lex")
- end;
-
- let val base = home ^ "src:"
- in
- chDir base; chDir "::";
- link "testtop.image"
- (true,true) (* -g -noheader *)
- (true,"") (* -autolink -P *)
- (base ^ "mosmllib") [(base ^ "compiler"),(base ^ "toolssrc")]
- ["Maine.uo"]
- end;
-
- let val base = home ^ "src:"
- in
- chDir base; chDir "::";
- link "mosmllex.image"
- (true,true) (* -g -noheader *)
- (true,"") (* -autolink -P *)
- (base ^ "mosmllib") [(base ^ "compiler"),(base ^ "lex")]
- ["Mainlex.uo"]
- end;
-
- copy_dir_obj (home ^ "src:mosmllib:") (home ^ "lib2:");
- compare_dirs_obj (home ^ "src:mosmllib:") (home ^ "lib2:");
-
- (* some useful lexer command lines...
- :mosmllex.image :src:lex:Scanner.lex
- :mosmllex.image :src:compiler:Lexer.lex
- :mosmllex.image :src:toolssrc:Deplex.lex
- *)
- (* and linker command lines...
- mosmllink.image -stdlib jalaMPW:ml:mosml142:src:mosmllib: -P none -g -I jalaMPW:ml:mosml142:src:compiler: -I jalaMPW:ml:mosml142:src:toolssrc: -I jalaMPW:ml:mosml142:src:lex: -noheader -o mosmltope jalaMPW:ml:mosml142:src:toolssrc:Maine.uo
- mosmllink.image -stdlib jalaMPW:ml:mosml142:src:mosmllib: -P none -g -I jalaMPW:ml:mosml142:src:compiler: -I jalaMPW:ml:mosml142:src:lex: -noheader -o mosmllex jalaMPW:ml:mosml142:src:lex:Mainlex.uo
- mosmllink.image -stdlib jalaMPW:ml:mosml142:src:mosmllib: -P none -g -I jalaMPW:ml:mosml142:src:compiler: -noheader -o mosmllink jalaMPW:ml:mosml142:src:compiler:Mainl.uo
- *)
-
- (*
- fun compare_files_contents src tgt =
- let val is = BasicIO.open_in_bin src
- in let val os = BasicIO.open_in_bin tgt
- in
- (compare_file_guts is os;
- BasicIO.close_in is;
- BasicIO.close_in os)
- handle x => (BasicIO.close_in os; raise x)
- end
- handle x => (BasicIO.close_in is; raise x)
- end
- ;
-
- compare_files_contents (home ^ "mosml.image") (home ^ "testtop.image");
- *)
-