From bd7398793200348c87a743d5dbd51795c8b113e2 Mon Sep 17 00:00:00 2001 From: DeaDDooMER Date: Tue, 21 Jul 2020 00:04:31 +0300 Subject: [PATCH] cpmake: add options for bootstrapping --- src/generic/Dsw/Mod/MakeMain.cp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/generic/Dsw/Mod/MakeMain.cp b/src/generic/Dsw/Mod/MakeMain.cp index 6512555..acf9619 100644 --- a/src/generic/Dsw/Mod/MakeMain.cp +++ b/src/generic/Dsw/Mod/MakeMain.cp @@ -57,7 +57,7 @@ MODULE DswMakeMain; END; VAR (* options *) - auto, trap, clean, symonly: BOOLEAN; + auto, trap, clean, symonly, nocode1, nocode2: BOOLEAN; 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(" -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; @@ -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 - CASE DswOpts.GetOpt("acd:sgGo:t:j:f:") OF + CASE DswOpts.GetOpt("acbxd:sgGo:t:j:f:") OF | "a": auto := TRUE + | "b": nocode1 := TRUE + | "x": nocode2 := 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); + 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; -- 2.29.2