X-Git-Url: https://deadsoftware.ru/gitweb?p=cpc.git;a=blobdiff_plain;f=src%2Fgeneric%2FDsw%2FMod%2FMakeMain.cp;h=e4f49c21635861aacb2f1f5cc88dbc17249970d9;hp=04388d2a574ddde1ce50e7968e6b0b5c32867c0c;hb=7147de0ec5fe252c907577218ae17a28ac84daba;hpb=25c73fbcd04d973272e0f8939a9de956fa9afbeb diff --git a/src/generic/Dsw/Mod/MakeMain.cp b/src/generic/Dsw/Mod/MakeMain.cp index 04388d2..e4f49c2 100644 --- a/src/generic/Dsw/Mod/MakeMain.cp +++ b/src/generic/Dsw/Mod/MakeMain.cp @@ -295,6 +295,7 @@ MODULE DswMakeMain; Log.String(" -Xi path Use executable file for internal linker (native only)"); Log.Ln; Log.String(" -Cg params Pass parameters to Component Pasacal compiler directly"); Log.Ln; Log.String(" -Ci params Pass parameters to internal linker directly"); Log.Ln; + Log.String(" -II Trap on user interrupt"); Log.Ln; Log.String(" -a Enable automatic dependency resolution"); Log.Ln; Log.String(" -o name Generate executable file"); Log.Ln; Log.String(" -j num Specifies the number of jobs to run simultaneously"); Log.Ln; @@ -376,12 +377,22 @@ MODULE DswMakeMain; END END ParseExternalOpts; + PROCEDURE ParseInfoOpts; + BEGIN + CASE DswOpts.GetOpt("I") OF + | "I": Kernel.intTrap := TRUE + | ":": Error(10, "-I" + DswOpts.str, "", 0) + | "?": Error(11, "-I" + DswOpts.str, "", 0) + | 0X: Error(11, "-I", "", 0) + END + END ParseInfoOpts; + PROCEDURE ParseArgs; 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:TCXhV") OF + CASE DswOpts.GetOpt("ao:j:D:U:TCXIhV") OF | "a": auto := TRUE | "o": exe := DswOpts.str | "j": jobs := MIN(MAX(StrToInt(DswOpts.str, 1), 1), maxJobs) @@ -392,6 +403,7 @@ MODULE DswMakeMain; | "T": ParseTargetOpts | "C": ParseCommandOpts | "X": ParseExternalOpts + | "I": ParseInfoOpts | ":": Error(10, "-" + DswOpts.str, "", 0) | "?": Error(11, "-" + DswOpts.str, "", 0) | "$": AddModule(DswOpts.str, def) @@ -966,5 +978,7 @@ MODULE DswMakeMain; BEGIN NEW(def); + ASSERT(def # NIL, 100); + Kernel.intTrap := FALSE; Kernel.Start(Main) END DswMakeMain.