X-Git-Url: http://git.hcoop.net/hcoop/mlt.git/blobdiff_plain/e98e6f583de3b319a17318363c01fdaf2776528f..16abb0f9dc821395f7644328a98d75a4aa97e83e:/src/compiler.sml diff --git a/src/compiler.sml b/src/compiler.sml index 0b6d484..6e31f5a 100644 --- a/src/compiler.sml +++ b/src/compiler.sml @@ -141,7 +141,7 @@ struct val _ = TextIO.closeOut outf val outf = TextIO.openOut (outPath ^ "/.build.sml") - val _ = TextIO.output (outf, "Control.quotation := true;\n") + val _ = TextIO.output (outf, "Control.quotation := true;\nControl.printWarnings := false;\n") fun printMlts [] = () | printMlts (h::t) = (TextIO.output (outf, "\"" ^ h ^ "\""); @@ -241,6 +241,10 @@ struct val _ = TextIO.output (outf, "]\nend\n\nstructure Main = MainFn(Templates)\n") val _ = TextIO.closeOut outf + val outf = TextIO.openOut (outPath ^ "/.build.sml") + val _ = TextIO.output (outf, "Control.printWarnings := false;\nCM.make \"sources.cm\";\nSMLofNJ.exportFn (\"" ^ outPath ^ "/heap\", Main.main);\n") + val _ = TextIO.closeOut outf + val outf = TextIO.openOut (outPath ^ "/sources.cm") val printNames = app (fn name => TextIO.output (outf, "\t" ^ name ^ "\n")) @@ -268,7 +272,7 @@ struct printNames outputs; TextIO.output (outf, "\n\t(* Driver *)\n\n\t_main.sml\n"); TextIO.closeOut outf; - if OS.Process.system (sml ^ "/ml-build " ^ outPath ^ "/sources.cm Main.main " ^ outPath ^ "/heap") = OS.Process.success then + if OS.Process.system ("cat " ^ outPath ^ "/.build.sml | " ^ sml ^ "/sml") = OS.Process.success then (ListPair.app makeScript (scripts, exports); OS.Process.success) else