summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 29c3491)
raw | patch | inline | side by side (parent: 29c3491)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Mon, 24 Feb 2020 13:51:20 +0000 (16:51 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Mon, 24 Feb 2020 13:51:20 +0000 (16:51 +0300) |
src/generic/Dsw/Mod/MakeMain.cp | patch | blob | history |
index 57a46d910d2845167cb7a58a763c4b0f53b360ad..57822e50c0aadd47b80e43f1e390754bda226996 100644 (file)
IMPORT Kernel, Files, Log, Strings, DswOpts, DswProcs, DswDocuments, DevCPM, DevCPT, DevCPR, DevCPS;
CONST
+ version = "0.3.0";
+
maxImps = 127;
maxJobs = maxImps;
Log.String(" -j num Specifies the number of jobs to run simultaneously"); Log.Ln;
Log.String(' -D ident["+"|"-"] Add preprocessor selector'); Log.Ln;
Log.String(' -U ident Remove preprocessor selector'); Log.Ln;
- Log.String(" -h Print help"); Log.Ln;
- Log.String(" -v Print version"); Log.Ln;
+ Log.String(" -h Print help and quit"); Log.Ln;
+ Log.String(" -V Print version and quit"); Log.Ln;
Kernel.Quit(1)
END Help;
+ PROCEDURE Version;
+ BEGIN
+ Log.String(version); Log.Ln;
+ Kernel.Quit(0)
+ END Version;
+
PROCEDURE ParseTargetOpts;
VAR s: DswOpts.String;
BEGIN
exe := NIL; auto := FALSE; jobs := 1; def.next := NIL; mno := 0; rno := 0;
processor := anymach; os := anyos; compiler := anycp;
LOOP
- CASE DswOpts.GetOpt("ao:j:D:U:TCXh") OF
+ CASE DswOpts.GetOpt("ao:j:D:U:TCXhV") OF
| "a": auto := TRUE
| "o": exe := DswOpts.str
| "j": jobs := MIN(MAX(StrToInt(DswOpts.str, 1), 1), maxJobs)
| "h": Help
+ | "V": Version
| "D": Define(DswOpts.str)
| "U": Undefine(DswOpts.str)
| "T": ParseTargetOpts
| "$": AddModule(DswOpts.str, def)
| 0X: EXIT
END
- END
+ END;
END ParseArgs;
PROCEDURE CheckParams;