Skip to content

Commit

Permalink
Parameterized goals #115 fix failing with gawk
Browse files Browse the repository at this point in the history
  • Loading branch information
xonixx committed Jan 21, 2023
1 parent f6be1b7 commit 7dbae83
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Makesurefile
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,15 @@ in_begin && $1 ~ /^split/ { next }

@goal tested_gawk51 @private
@depends_on installed_gawk51
AWKLIBPATH="$(pwd)/soft/gawk51_libs" AWK="$(pwd)/soft/gawk51" ./makesure tested
MAKESURE_AWKLIBPATH="$(pwd)/soft/gawk51_libs" AWK="$(pwd)/soft/gawk51" ./makesure tested

@goal tested_gawk511 @private
@depends_on installed_gawk511
AWKLIBPATH="$(pwd)/soft/gawk511_libs" AWK="$(pwd)/soft/gawk511" ./makesure tested
MAKESURE_AWKLIBPATH="$(pwd)/soft/gawk511_libs" AWK="$(pwd)/soft/gawk511" ./makesure tested

@goal tested_gawk521 @private
@depends_on installed_gawk521
AWKLIBPATH="$(pwd)/soft/gawk521_libs" AWK="$(pwd)/soft/gawk521" ./makesure tested
MAKESURE_AWKLIBPATH="$(pwd)/soft/gawk521_libs" AWK="$(pwd)/soft/gawk521" ./makesure tested

@goal tested_goawk @private
@depends_on installed_goawk
Expand Down
2 changes: 1 addition & 1 deletion makesure.awk
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ body,goalBody,goalBodies,resolvedGoals,exitCode, t0,t1,t2, goalTimed, list) {

topologicalSort(0,GoalNames) # first do topological sort disregarding @reached_if to catch loops

instantiateGoals()
# instantiateGoals()

# printDepsTree("a")

Expand Down
4 changes: 4 additions & 0 deletions makesure_dev
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ AWK_DIR="$mydir"

if awk 'BEGIN { exit index(ENVIRON["AWK"],"gawk")>0 ? 0 : 1 }'
then
if [ -n $MAKESURE_AWKLIBPATH ]
then
export AWKLIBPATH="$MAKESURE_AWKLIBPATH"
fi
exec $AWK $AWK_OPTS -v "Version=$NEXT_VERSION" -v "Prog=$0" -v Gawk=1 -l time -f "$AWK_DIR/makesure.awk" Makesurefile "$@"
else
exec $AWK $AWK_OPTS -v "Version=$NEXT_VERSION" -v "Prog=$0" -f "$AWK_DIR/mawk_ext.awk" -f "$AWK_DIR/makesure.awk" Makesurefile "$@"
Expand Down

0 comments on commit 7dbae83

Please sign in to comment.