about summary refs log tree commit diff stats
path: root/cpp/013run
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-04-05 18:56:20 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-04-05 18:56:20 -0700
commit267ebb590b0a08d6e8bc9e3f8644b491d0d790ac (patch)
treeb0a5106b3a9373764cf1148ce2827301f3fc7510 /cpp/013run
parentf2cafededd8d57237263fc7cb7d726ad1eacecd2 (diff)
downloadmu-267ebb590b0a08d6e8bc9e3f8644b491d0d790ac.tar.gz
1018 - build system now handles .mu layers
No support for tests yet. Need to manually run the current test with:
  $ mu string-test.mu

Also, string-equal seems to have a problem.
Diffstat (limited to 'cpp/013run')
-rw-r--r--cpp/013run12
1 files changed, 9 insertions, 3 deletions
diff --git a/cpp/013run b/cpp/013run
index 48de68d0..7296d128 100644
--- a/cpp/013run
+++ b/cpp/013run
@@ -83,10 +83,9 @@ inline bool done(routine& rr) {
 :(before "End Main")
 if (argc > 1) {
   setup();
+  load("core.mu");
   for (int i = 1; i < argc; ++i) {
-    ifstream fin(argv[i]);
-    while (!fin.eof()) add_recipe(fin);
-    fin.close();
+    load(argv[i]);
   }
 
   Trace_stream = new trace_stream;
@@ -97,6 +96,13 @@ if (argc > 1) {
   dump_memory();
 }
 
+:(code)
+void load(string filename) {
+  ifstream fin(filename.c_str());
+  while (!fin.eof()) add_recipe(fin);
+  fin.close();
+}
+
 //: helper for tests
 
 :(before "End Globals")