summaryrefslogtreecommitdiff
path: root/maint.mk
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-04-22 09:33:25 +0200
committerJim Meyering <meyering@redhat.com>2008-04-22 09:33:25 +0200
commit79a98d9bc1ee67dadc8df376d336c4f1270c464d (patch)
tree67413c57500935e3ab467e569a6ae972614f0395 /maint.mk
parenta6894d063c16300995b41ce0f1846040dda2c6ff (diff)
downloadcoreutils-79a98d9bc1ee67dadc8df376d336c4f1270c464d.tar.xz
tests: ensure that all exec-$PERL lines are the same
* maint.mk (sc_perl_coreutils_test): New rule.
Diffstat (limited to 'maint.mk')
-rw-r--r--maint.mk18
1 files changed, 18 insertions, 0 deletions
diff --git a/maint.mk b/maint.mk
index 586596b45..46bc8b613 100644
--- a/maint.mk
+++ b/maint.mk
@@ -407,6 +407,24 @@ 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:
+ @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'; \
+ exit 1; } || :; \
+ fi
+
# Ensure that the c99-to-c89 patch applies cleanly.
patch-check:
rm -rf src-c89 $@.1 $@.2