From b291c607f79c59505e9802aec24b6b95c8d317f9 Mon Sep 17 00:00:00 2001 From: xonix Date: Sun, 7 Jan 2024 01:15:04 +0200 Subject: [PATCH] Release 0.9.22 #157 --- makesure | 15 +++++++++------ makesure_candidate | 15 +++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/makesure b/makesure index 6203e6b..66648c5 100755 --- a/makesure +++ b/makesure @@ -216,7 +216,7 @@ function handleDoc(i){ registerDoc(globGoal(i))}} function registerDoc(goalName){ if(goalName in Doc) - addError("Multiple "$1" not allowed for a goal") + addError("Multiple @doc not allowed for a goal") $1="" Doc[goalName]=trim($0)} function handleDependsOn(i){ @@ -251,7 +251,7 @@ function makeGlobVarsCode(i){ return"ITEM="quoteArg(GlobFiles[i])";INDEX="i";TOTAL="GlobCnt";"} function registerReachedIf(goalName,preScript){ if(goalName in ReachedIf) - addError("Multiple "$1" not allowed for a goal") + addError("Multiple @reached_if not allowed for a goal") trimDirective() ReachedIf[goalName]=preScript trim($0)} function trimDirective(){ @@ -361,8 +361,11 @@ function currentGoalName(){return arrLast(GoalNames)} function currentLibName(){return arrLast(LibNames)} function realExit(code){ exit code} -function addError(err,n){if(!n)n=NR;Error=addL(Error,err":\n"ARGV[1]":"n": "Lines[n])} -function addErrorDedup(err,n){if((err,n)in AddedErrors)return;AddedErrors[err,n];addError(err,n)} +function addError(err,n){ + if((err,n?n:(n=NR))in AddedErrors) + return + AddedErrors[err,n] + Error=addL(Error,err":\n"ARGV[1]":"n": "Lines[n])} function die(msg,out){ out="cat 1>&2" print msg|out @@ -463,7 +466,7 @@ function instantiate(goal,args,newArgs,i,j,depArg,depArgType,dep,goalNameInstant parseCli_2(DependencyArgsL[gi],args,Vars,reparsed) argsCnt=reparsed[-7]-3} if(dep in GoalsByName&&argsCnt!=GoalParamsCnt[dep]) - addErrorDedup("wrong args count for '\''"dep"'\''",DependenciesLineNo[gi]) + addError("wrong args count for '\''"dep"'\''",DependenciesLineNo[gi]) for(j=0;j