From 68158e6b1025292c9cc540ffeebe560a0772d255 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 8 Jun 2008 10:30:50 +0200 Subject: syntax-check: detect anachronistic Perl-based tests * maint.mk (sc_no_exec_perl_coreutils): Rename and rewrite. --- maint.mk | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'maint.mk') diff --git a/maint.mk b/maint.mk index ee0e28916..5f9f1f006 100644 --- a/maint.mk +++ b/maint.mk @@ -421,21 +421,14 @@ sc_GPL_version: @grep -n 'either ''version [^3]' $$($(VC_LIST_EXCEPT)) && \ { echo '$(ME): GPL vN, N!=3' 1>&2; exit 1; } || : -exec_perl_re = \ - exec \$$PERL -w -I\$$top_srcdir/tests -MCoreutils \ - -M"CuTmpdir qw(\$$me)" -- - <<\\EOF -# Ensure that each test invoking $PERL with -MCoreutils uses the same line. -sc_perl_coreutils_test: +# Perl-based tests used to exec perl from a #!/bin/sh script. +# Now they all start with #!/usr/bin/perl and the portability +# infrastructure is in tests/Makefile.am. Make sure no old-style +# script sneaks back in. +sc_no_exec_perl_coreutils: @if test -f $(srcdir)/tests/Coreutils.pm; then \ - die=0; \ - for i in $$(grep -l '^exec *\$$PERL.*MCoreutils' \ - $$($(VC_LIST) tests)); do \ - grep '$(exec_perl_re)' $$i > /dev/null \ - && : || { die=1; echo $$i; } \ - done; \ - test $$die = 1 && \ - { echo 1>&2 '$(ME): each of the above execs PERL differently:'; \ - echo 1>&2 '(exit $$fail); exit $$fail'; \ + grep '^exec *\$$PERL.*MCoreutils' $$($(VC_LIST) tests) && \ + { echo 1>&2 '$(ME): found anachronistic Perl-based tests'; \ exit 1; } || :; \ fi -- cgit v1.2.3-54-g00ecf