Fixing for 110.46
authorAdam Chlipala <adamc@hcoop.net>
Thu, 12 Aug 2004 06:37:15 +0000 (06:37 +0000)
committerAdam Chlipala <adamc@hcoop.net>
Thu, 12 Aug 2004 06:37:15 +0000 (06:37 +0000)
build
src/compiler.sml

diff --git a/build b/build
index 9d48509..49811e7 100755 (executable)
--- a/build
+++ b/build
@@ -13,6 +13,12 @@ fi
 if [ -d lib/CM ] ; then
     rm -rf lib/CM
 fi
+if [ -d .cm ] ; then
+    rm -rf .cm
+fi
+if [ -d lib/.cm ] ; then
+    rm -rf lib/.cm
+fi
 
 if ! cat build.sml | $SMLBIN/sml ; then
     exit 1
index aa4db33..b335cd9 100644 (file)
@@ -242,7 +242,7 @@ struct
            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.output (outf, "Control.printWarnings := false;\nprint \"Here we go\"\n;\nCM.make \"sources.cm\";\nSMLofNJ.exportFn (\"" ^ outPath ^ "/heap\", Main.main);\n")
            val _ = TextIO.closeOut outf
 
            val outf = TextIO.openOut (outPath ^ "/sources.cm")
@@ -272,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 ("cat " ^ outPath ^ "/.build.sml | " ^ sml ^ "/sml") = OS.Process.success then
+                if OS.Process.system ("cd " ^ outPath ^ " ; cat .build.sml | " ^ sml ^ "/sml") = OS.Process.success then
                     (ListPair.app makeScript (scripts, exports);
                      OS.Process.success)
                 else