From: Stefano Lattarini Date: Sat, 27 Oct 2012 16:16:34 +0000 (+0200) Subject: tests: fix a spurious grepping failure X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b5bbeeb4e204fc99c741a6ed058f4d951c7a0c9;p=thirdparty%2Fautomake.git tests: fix a spurious grepping failure * t/per-target-flags.sh: Here. Signed-off-by: Stefano Lattarini --- diff --git a/t/per-target-flags.sh b/t/per-target-flags.sh index 4114079cb..f5ca61475 100755 --- a/t/per-target-flags.sh +++ b/t/per-target-flags.sh @@ -83,7 +83,16 @@ $EGREP '[^-](foo|bar)\.[o$]' $makefiles && exit 1 # All our programs and libraries have per-target flags, so all # the compilers invocations must use an explicit '-c' option. -grep '\$.COMPILE' $makefiles | grep -v ' -c' && exit 1 +# We must be careful to take line continuations into account. +grep . $makefiles | $PERL -ne ' + use warnings FATAL => "all"; + /\$.COMPILE/ or next; + $_ .= while (/\\$/); + s/\n/[cont]/g; + print; +' > output +cat output # For debugging. +grep -v ' -c' output && exit 1 $FGREP 'foo-foo.$(OBJEXT)' Makefile.in $FGREP 'foo-foo.$(OBJEXT)' Makefile2.in