From: Stefano Lattarini Date: Sat, 25 May 2013 20:18:45 +0000 (+0200) Subject: lint: recipes of syntax check require GNU grep; ensure it is used X-Git-Tag: v1.13.2b~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=057ff0fed7cfd7fa50fb0af99b112d90463be9d3;p=thirdparty%2Fautomake.git lint: recipes of syntax check require GNU grep; ensure it is used * syntax-checks.mk (sc_sanity_gnu_grep): New. ($(syntax_check_rules)): Depend on it. Signed-off-by: Stefano Lattarini --- diff --git a/syntax-checks.mk b/syntax-checks.mk index 3922896ba..4dacc5a2e 100644 --- a/syntax-checks.mk +++ b/syntax-checks.mk @@ -79,6 +79,18 @@ sc_unquoted_DESTDIR \ sc_tabs_in_texi \ sc_at_in_texi +# The recipes of syntax checks require a modern GNU grep. +sc_sanity_gnu_grep: + $(AM_V_GEN)grep --version | grep 'GNU grep' >/dev/null 2>&1 \ + && ab=$$(printf 'a\nb') \ + && test "$$(printf 'xa\nb\nc' | grep -Pzo 'a\nb')" = "$$ab" \ + || { \ + echo "Syntax checks recipes require a modern GNU grep" >&2; \ + exit 1; \ + } +.PHONY: sc_sanity_gnu_grep +$(syntax_check_rules): sc_sanity_gnu_grep + ## These check avoids accidental configure substitutions in the source. ## There are exactly 8 lines that should be modified from automake.in to ## automake, and 9 lines that should be modified from aclocal.in to