From 4b5bbeeb4e204fc99c741a6ed058f4d951c7a0c9 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sat, 27 Oct 2012 18:16:34 +0200 Subject: [PATCH] tests: fix a spurious grepping failure * t/per-target-flags.sh: Here. Signed-off-by: Stefano Lattarini --- t/per-target-flags.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 -- 2.47.2