Skip to content

Commit

Permalink
Parameterized goals #115
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Jan 18, 2023
1 parent 68c1ac7 commit 2a3164a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
9 changes: 7 additions & 2 deletions makesure.awk
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,24 @@ BEGIN {
SupportedOptions["tracing"]
SupportedOptions["silent"]
SupportedOptions["timing"]
split("",Lines)
split("",Lines)# line no. -> line
split("",Args) # parsed CLI args
split("",ArgGoals) # invoked goals
split("",Options)
split("",GoalNames) # list
split("",GoalsByName) # name -> private
split("",GoalParamsCnt) # name -> params cnt
split("",GoalParams) # name,paramI -> param name
split("",CodePre) # name -> pre-body (should also go before lib)
split("",Code) # name -> body
split("",DefineOverrides) # k -> ""
DefinesCode=""
split("",Dependencies) # name,i -> dep goal
split("",DependenciesLineNo) # name,i -> line no.
split("",DependenciesCnt) # name -> dep cnd
split("",DependenciesCnt) # name -> dep cnt
split("",DependencyArgsCnt) # name,i -> args cnt
split("",DependencyArgs) # name,depI,argI -> val
split("",DependencyArgsType) # name,depI,argI -> string|var
split("",Doc) # name -> doc str
split("",ReachedIf) # name -> condition line
GlobCnt = 0 # count of files for glob
Expand Down
6 changes: 6 additions & 0 deletions tests/27_parameterized_goals.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

@goal a
@depends_on b @args 'hello'

@goal b @params S
echo "$S world"

0 comments on commit 2a3164a

Please sign in to comment.