* tests/Makefile.am (do_subst): Also substitute '@AWK@'.
* tests/defs-static.in ($AWK): New, user-overridable and defaulting
to the substituted '@AWK@'.
* tests/defs (fetch_tap_driver): When the shell+awk implementation
of the TAP driver is required, export AM_TAP_AWK to point to a
properly capable awk, since the default awk might be a "traditional"
implementation, which won't be enough for our driver. This is the
right fix, since a proper setting of AM_TAP_AWK in the driver's
environment is expected (and documented to be required) in real
world uses of 'tap-driver.sh'.
-e 's|@APIVERSION[@]|$(APIVERSION)|g' \
-e 's|@PATH_SEPARATOR[@]|$(PATH_SEPARATOR)|g' \
-e 's|@SHELL[@]|$(SHELL)|g' \
+ -e 's|@AWK[@]|$(AWK)|g' \
-e 's|@PERL[@]|$(PERL)|g' \
-e 's|@EGREP[@]|$(EGREP)|g' \
-e 's|@FGREP[@]|$(FGREP)|g' \
sed "1s|#!.*|#! $PERL -w|" "$am_scriptdir"/tap-driver.pl >tap-driver
;;
shell)
+ AM_TAP_AWK=$AWK; export AM_TAP_AWK
sed "1s|#!.*|#! $SHELL|" "$am_scriptdir"/tap-driver.sh >tap-driver
;;
*)
# User can override various tools used. Prefer overriding specific for
# that automake testsuite, if they are available.
+AWK=${AM_TESTSUITE_AWK-${AWK-'@AWK@'}}
PERL=${AM_TESTSUITE_PERL-${PERL-'@PERL@'}}
MAKE=${AM_TESTSUITE_MAKE-${MAKE-'make'}}
YACC=${AM_TESTSUITE_YACC-${YACC-'@YACC@'}}