From: DeaDDooMER Date: Mon, 24 Feb 2020 17:12:20 +0000 (+0300) Subject: cpmake: disable stack trace on user interrupt by default X-Git-Url: https://deadsoftware.ru/gitweb?p=cpc.git;a=commitdiff_plain;h=7f1b7f03b369af263daa1007b5fa753da9f99bf4 cpmake: disable stack trace on user interrupt by default --- 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.