From: DeaDDooMER Date: Mon, 20 Jul 2020 17:29:10 +0000 (+0300) Subject: cpmake: add option to generate symbol files only X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=e38e4b1828a9ebbcabd1bbfa8bd226d6503c33ec;p=cpc.git cpmake: add option to generate symbol files only --- diff --git a/src/generic/Dsw/Mod/MakeMain.cp b/src/generic/Dsw/Mod/MakeMain.cp index 8247999..7d98bdf 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: BOOLEAN; + auto, trap, clean, symonly: BOOLEAN; exe, target, base: String; jobs: INTEGER; @@ -157,6 +157,7 @@ MODULE DswMakeMain; Log.String("Options:"); Log.Ln; Log.String(" -a Enable automatic dependency resolution"); Log.Ln; Log.String(" -c Remove all generated files"); Log.Ln; + Log.String(" -s Generate symbol files only"); Log.Ln; Log.String(" -t target Specify target rules"); Log.Ln; Log.String(" -o file Generate object file"); Log.Ln; Log.String(" -j num Specifies the number of jobs to run simultaneously"); Log.Ln; @@ -171,10 +172,11 @@ 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("acdgo:t:j:f:") OF + CASE DswOpts.GetOpt("acdsgo:t:j:f:") OF | "a": auto := TRUE | "c": clean := TRUE | "d": trap := TRUE + | "s": symonly := TRUE | "f": base := DswOpts.str | "h": Help | "j": jobs := MIN(MAX(StrToInt(DswOpts.str, 1), 1), maxJobs) @@ -524,7 +526,7 @@ MODULE DswMakeMain; p.Program(base + "/" + target + "/" + "build"); p.PutParam(m.odc); IF force IN m.flags THEN p.PutParam("-f") END; - IF library IN m.flags THEN p.PutParam("-s") END; + IF symonly OR (library IN m.flags) THEN p.PutParam("-s") END; s := def.next; WHILE s # NIL DO IF s.value THEN p.PutParam("-D") ELSE p.PutParam("-d") END; @@ -588,7 +590,7 @@ MODULE DswMakeMain; PROCEDURE Link; VAR p: DswProcs.Process; ok: BOOLEAN; i, res: INTEGER; BEGIN - IF exe # NIL THEN + IF ~symonly & (exe # NIL) THEN p := DswProcs.dir.New(); p.Program(base + "/" + target + "/" + "link"); p.PutParam(exe$);