DEADSOFTWARE

cpmake: add options for bootstrapping
[cpc.git] / src / generic / Dsw / Mod / MakeMain.cp
index 6512555a8fd33bef5be1006dd08d986a7049e337..acf9619195372ae79e6b78374795cf60e75dcd5e 100644 (file)
@@ -57,7 +57,7 @@ MODULE DswMakeMain;
     END;
 
   VAR (* options *)
     END;
 
   VAR (* options *)
-    auto, trap, clean, symonly: BOOLEAN;
+    auto, trap, clean, symonly, nocode1, nocode2: BOOLEAN;
     exe, target, base: String;
     jobs: INTEGER;
 
     exe, target, base: String;
     jobs: INTEGER;
 
@@ -156,6 +156,8 @@ MODULE DswMakeMain;
     Log.String("Usage: cpmake [options] module..."); Log.Ln;
     Log.String("Options:"); Log.Ln;
     Log.String("  -a          Enable automatic dependency resolution"); Log.Ln;
     Log.String("Usage: cpmake [options] module..."); Log.Ln;
     Log.String("Options:"); Log.Ln;
     Log.String("  -a          Enable automatic dependency resolution"); Log.Ln;
+    Log.String("  -b          Do not compile modules"); Log.Ln;
+    Log.String("  -x          Do not link objects"); Log.Ln;
     Log.String("  -c          Remove all generated files"); Log.Ln;
     Log.String("  -s          Generate symbol files only"); Log.Ln;
     Log.String("  -d selector Add selector"); Log.Ln;
     Log.String("  -c          Remove all generated files"); Log.Ln;
     Log.String("  -s          Generate symbol files only"); Log.Ln;
     Log.String("  -d selector Add selector"); Log.Ln;
@@ -173,8 +175,10 @@ MODULE DswMakeMain;
     exe := NIL; auto := FALSE; jobs := 1; def.next := NIL; mno := 0; rno := 0;
     target := NewStr("default"); base := NewStr("cprules");
     LOOP
     exe := NIL; auto := FALSE; jobs := 1; def.next := NIL; mno := 0; rno := 0;
     target := NewStr("default"); base := NewStr("cprules");
     LOOP
-      CASE DswOpts.GetOpt("acd:sgGo:t:j:f:") OF
+      CASE DswOpts.GetOpt("acbxd:sgGo:t:j:f:") OF
       | "a": auto := TRUE
       | "a": auto := TRUE
+      | "b": nocode1 := TRUE
+      | "x": nocode2 := TRUE
       | "c": clean := TRUE
       | "g": trap := TRUE
       | "G": Kernel.intTrap := TRUE
       | "c": clean := TRUE
       | "g": trap := TRUE
       | "G": Kernel.intTrap := TRUE
@@ -528,6 +532,8 @@ MODULE DswMakeMain;
     p := DswProcs.dir.New();
     p.Program(base + "/" + target + "/" + "build");
     p.PutParam(m.odc);
     p := DswProcs.dir.New();
     p.Program(base + "/" + target + "/" + "build");
     p.PutParam(m.odc);
+    IF nocode1 THEN p.PutParam("-b") END;
+    IF nocode2 THEN p.PutParam("-x") END;
     IF force IN m.flags THEN p.PutParam("-f") END;
     IF symonly OR (library IN m.flags) THEN p.PutParam("-s") END;
     s := def.next;
     IF force IN m.flags THEN p.PutParam("-f") END;
     IF symonly OR (library IN m.flags) THEN p.PutParam("-s") END;
     s := def.next;