Skip to content

Commit

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

@goal tested_bwk @private
@depends_on installed_bwk
AWK="$(pwd)/soft/bwk" ./makesure_dev tested
AWK="$(pwd)/soft/bwk" ./makesure tested

@goal tested_mawk134 @private
@depends_on installed_mawk134
AWK="$(pwd)/soft/mawk134" ./makesure_dev tested
AWK="$(pwd)/soft/mawk134" ./makesure tested

@goal tested_gawk51 @private
@depends_on installed_gawk51
AWKLIBPATH="$(pwd)/soft/gawk51_libs" AWK="$(pwd)/soft/gawk51" ./makesure_dev tested
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_dev tested
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_dev tested
AWKLIBPATH="$(pwd)/soft/gawk521_libs" AWK="$(pwd)/soft/gawk521" ./makesure tested

@goal tested_goawk @private
@depends_on installed_goawk
AWK="$(pwd)/soft/$GOAWK" ./makesure_dev tested
AWK="$(pwd)/soft/$GOAWK" ./makesure tested

@goal tested_goawk_branch @private
@depends_on installed_goawk_branch
AWK="$(pwd)/soft/$GOAWK_BRANCH_EXE" ./makesure_dev tested
AWK="$(pwd)/soft/$GOAWK_BRANCH_EXE" ./makesure tested

@goal tested_mawk @private
if [[ -x /usr/bin/mawk ]]
then
AWK="/usr/bin/mawk" ./makesure_dev tested
AWK="/usr/bin/mawk" ./makesure tested
else
echo "No default mawk... Skipped testing it."
fi

#@goal tested_busybox
# AWK="busybox awk" ./makesure_dev tested
# AWK="busybox awk" ./makesure tested

@goal installed_awks
@doc installs all awks into ./soft
Expand Down
4 changes: 2 additions & 2 deletions makesure.awk
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,8 @@ body,goalBody,goalBodies,resolvedGoals,exitCode, t0,t1,t2, goalTimed, list) {
preludeCode = getPreludeCode()

for (i = 0; i in GoalNames; i++) {
emptyGoals[goalName] = "" == (body = trim(Code[goalName = GoalNames[i]]))

body = trim(Code[goalName = GoalNames[i]])
emptyGoals[goalName] = "" == body
goalBody[0] = ""
addLine(goalBody, preludeCode)
addLine(goalBody, CodePre[goalName])
Expand Down

0 comments on commit f6be1b7

Please sign in to comment.