This change fixes https://bugs.gnu.org/14196.
* m4/missing.m4 (AM_MISSING_HAS_RUN): always quote the
invocation (not just if $am_aux_dir contains space or tab), in
case $am_aux_dir contains () or other metachars not rejected by
AM_SANITY_CHECK; quoting with '...' suggested by Jim Meyering.
* t/man6.sh (HELP2MAN): adjust grep since missing value
is quoted now.
* t/am-missing-prog.sh: likewise.
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl
if test x"${MISSING+set}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
- *)
- MISSING="\${SHELL} $am_aux_dir/missing" ;;
- esac
+ MISSING="\${SHELL} '$am_aux_dir/missing'"
fi
# Use eval to expand $SHELL
if eval "$MISSING --is-lightweight"; then
$FGREP COMMAND Makefile.in Makefile # For debugging.
-grep "^NO_SUCH_COMMAND = \${SHELL} .*/missing .*am-none-none" Makefile
-grep "^MISMATCHED_COMMAND = \${SHELL} .*/missing .*am-exit-63" Makefile
-grep "^COMMAND_FOUND = \${SHELL} .*/missing .*my-command" Makefile
+grep "^NO_SUCH_COMMAND = \${SHELL} .*/missing.* .*am-none-none" Makefile
+grep "^MISMATCHED_COMMAND = \${SHELL} .*/missing.* .*am-exit-63" Makefile
+grep "^COMMAND_FOUND = \${SHELL} .*/missing.* .*my-command" Makefile
grep '^OVERRIDDEN_COMMAND = am-overridden *$' Makefile
$MAKE test1 test2 test3 test4
cd build
../configure
-# Sanity check.
-grep '^HELP2MAN *=.*/missing help2man' Makefile
+# Sanity check. The line we're matching looks like this:
+# HELP2MAN = ${SHELL} '/am/checkout/t/man6.dir/missing' help2man
+# so let's not try to match the exact intervening quote.
+grep '^HELP2MAN *=.*/missing.* help2man' Makefile
$MAKE
$FGREP foobar ../foobar.1
rm -f *.1 # Remove leftover generated manpages.
./configure
-# Sanity check.
-grep '^HELP2MAN *=.*/missing help2man' Makefile
+# Sanity check again, same as above.
+grep '^HELP2MAN *=.*/missing.* help2man' Makefile
$MAKE
$FGREP foobar foobar.1