43
43
command ("cvs -z3 -d" ^ root ^ " " ^ cmd)
46
if !bytecode then command ("ocamlfind ocamlc -c " ^ file);
47
if !native then command ("ocamlfind ocamlopt -c " ^ file)
46
if bytecode then command ("ocamlc -c " ^ file);
47
if native then command ("ocamlopt -c " ^ file)
49
49
let modules l ext =
50
50
String.concat " " (List.map (fun f -> f ^ ext) l)
55
let sourceforge = ":pserver:anonymous@cvs.sourceforge.net:/cvsroot/ocaml-lib" in
56
54
let motiontwin = ":pserver:anonymous@cvs.motion-twin.com:/cvsroot" in
60
58
msg "*** Please hit enter on login (empty password) ***";
61
cvs sourceforge "login";
62
cvs sourceforge "co extlib-dev";
64
msg "*** Please hit enter on login (empty password) ***";
65
59
cvs motiontwin "login";
60
cvs motiontwin "co ocaml/extlib-dev";
66
61
cvs motiontwin "co ocaml/mtasc";
67
62
cvs motiontwin "co ocaml/swflib";
68
63
cvs motiontwin "co ocaml/extc";
75
(* (try Unix.mkdir "bin" 0o740 with Unix.Unix_error(Unix.EEXIST,_,_) -> ()); *)
69
(try Unix.mkdir "bin" 0o740 with Unix.Unix_error(Unix.EEXIST,_,_) -> ());
79
Sys.chdir "extlib-dev";
80
command ("ocaml install.ml -nodoc -d ../ocaml " ^ (if bytecode then "-b " else "") ^ (if native then "-n" else ""));
72
Sys.chdir "ocaml/extlib-dev";
73
command ("ocaml install.ml -nodoc -d .. " ^ (if bytecode then "-b " else "") ^ (if native then "-n" else ""));
86
78
Sys.chdir "ocaml/extc";
87
79
let c_opts = (if Sys.ocaml_version < "3.08" then " -ccopt -Dcaml_copy_string=copy_string " else " ") in
88
command ("ocamlfind ocamlc" ^ c_opts ^ "extc_stubs.c");
80
command ("ocamlc" ^ c_opts ^ "extc_stubs.c");
90
82
let options = "-cclib ../extc/extc_stubs" ^ obj_ext ^ " -cclib " ^ zlib ^ " extc.mli extc.ml" in
91
if !bytecode then command ("ocamlfind ocamlc -a -o extc.cma " ^ options);
92
if !native then command ("ocamlfind ocamlopt -a -o extc.cmxa " ^ options);
83
if bytecode then command ("ocamlc -a -o extc.cma " ^ options);
84
if native then command ("ocamlopt -a -o extc.cmxa " ^ options);
96
88
Sys.chdir "ocaml/swflib";
97
let files = "-I .. -I ../extc swf.ml swfZip.ml actionScript.ml swfParser.ml" in
98
if !bytecode then command ("ocamlfind ocamlc -package extlib -a -o swflib.cma " ^ files);
99
if !native then command ("ocamlfind ocamlopt -package extlib -a -o swflib.cmxa " ^ files);
89
let files = "-I .. -I ../extc as3.mli as3code.ml as3parse.ml swf.ml swfZip.ml actionScript.ml swfParser.ml" in
90
if bytecode then command ("ocamlc -a -o swflib.cma " ^ files);
91
if native then command ("ocamlopt -a -o swflib.cmxa " ^ files);
100
92
Sys.chdir "../..";
104
96
command "ocamllex lexer.mll";
105
97
ocamlc "expr.ml lexer.ml";
106
98
ocamlc "-pp camlp4o parser.ml";
107
ocamlc "-package extlib -I .. -I ../extc -I ../swflib typer.ml class.ml plugin.ml genSwf.ml main.ml";
99
ocamlc "-I .. -I ../extc -I ../swflib typer.ml class.ml plugin.ml genSwf.ml main.ml";
108
100
let mlist = ["expr";"lexer";"parser";"typer";"class";"plugin";"genSwf";"main"] in
109
if !bytecode then command ("ocamlfind ocamlc -package extlib -custom -o mtasc" ^ exe_ext ^ " extLib.cma ../extc/extc.cma ../swflib/swflib.cma " ^ modules mlist ".cmo");
110
if !native then command ("ocamlfind ocamlopt -package extlib -o mtasc" ^ exe_ext ^ " extLib.cmxa ../extc/extc.cmxa ../swflib/swflib.cmxa " ^ modules mlist ".cmx");
101
if bytecode then command ("ocamlc -custom -o ../../bin/mtasc-byte" ^ exe_ext ^ " ../extLib.cma ../extc/extc.cma ../swflib/swflib.cma " ^ modules mlist ".cmo");
102
if native then command ("ocamlopt -o ../../bin/mtasc" ^ exe_ext ^ " ../extLib.cmxa ../extc/extc.cmxa ../swflib/swflib.cmxa " ^ modules mlist ".cmx");
113
105
let startdir = Sys.getcwd() in
117
"-b", Arg.Set bytecode, "build bytecode version";
118
"-n", Arg.Set native, "native code version";
119
] (fun argi -> args := argi :: !args) "Usage:";
121
109
Sys.chdir startdir;