automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

22-maintainer-check.patch


From: Akim Demaille
Subject: 22-maintainer-check.patch
Date: Sun, 04 Feb 2001 15:39:03 +0100

Index: ChangeLog
from  Akim Demaille  <address@hidden>
        
        * Makefile.am (perl4-check): Remove, we now require Perl 5.
        (maintainer-check): Don't be silent when you find a problem, and
        actually, even specify the locations.
        Also check that @_ is assigned to arrays.
        
Index: Makefile.am
--- Makefile.am Wed, 31 Jan 2001 22:34:58 +0100 akim (am/f/46_Makefile.a 1.4 
664)
+++ Makefile.am Fri, 02 Feb 2001 07:21:22 +0100 akim (am/f/46_Makefile.a 1.4 
664)
@@ -58,12 +58,6 @@
 ## to anybody else
 ##
 
-# Run the test suite using Perl 4.
-perl4-check: automake aclocal
-       @if $(SHELL) -c 'perl4.036 -v' > /dev/null 2>&1; then \
-         $(MAKE) PERL=perl4.036 check; \
-       else :; fi
-
 # Some simple checks, and then ordinary check.  These are only really
 # guaranteed to work on my machine.
 maintainer-check: automake aclocal
@@ -81,40 +75,44 @@
 ## expect no instances of '${...}'.  However, $${...} is ok, since that
 ## is a shell construct, not a Makefile construct.
 ## The backslash in `$${' is needed for some versions of bash.
-       @if test `fgrep '\$${' $(srcdir)/[a-z]*.am | fgrep -v '$$$$' | wc -l` 
-ne 0; then \
-         echo "found too many uses of '\$${'" 1>&2; \
+       @if fgrep '\$${' $(srcdir)/[a-z]*.am | \
+              fgrep -v '$$$$' | \
+              grep . ; then \
+         echo "Found too many uses of '\$${' in the lines above." 1>&2; \
          exit 1;                               \
        else :; fi
 ## Make sure all invocations of mkinstalldirs are correct.
-       @if test `fgrep 'mkinstalldirs' $(srcdir)/[a-z]*.am | fgrep -v 
'$$(mkinstalldirs)' | wc -l` -ne 0; then \
-         echo "found incorrect use of mkinstalldirs" 1>&2; \
+       @if fgrep -n 'mkinstalldirs' $(srcdir)/[a-z]*.am | \
+             fgrep -v '$$(mkinstalldirs)' | \
+             grep . ; then \
+         echo "Found incorrect use of mkinstalldirs in the lines above" 1>&2; \
          exit 1; \
        else :; fi
-## Another syntax check, this time with Perl 4, if it exists.
-       @if $(SHELL) -c 'perl4.036 -v' >/dev/null 2>&1; then \
-         perl4.036 -c -w automake; \
-         perl4.036 -c -w aclocal; \
-       else :; fi
 ## We never want to use "undef", only "delete".
-       @if grep -w undef $(srcdir)/automake.in > /dev/null 2>&1; then \
+       @if grep -n -w undef $(srcdir)/automake.in; then \
          echo "Found undef in automake.in; use delete instead" 1>&2; \
          exit 1; \
        fi
 ## We never want split (/ /,...), only split (' ', ...).
-       @if fgrep 'split (/ /' $(srcdir)/automake.in > /dev/null 2>&1; then \
-         echo "Found bad split in automake.in" 1>&2; \
+       @if fgrep -n 'split (/ /' $(srcdir)/automake.in; then \
+         echo "Found bad split in the lines above." 1>&2; \
          exit 1; \
        fi
 ## Look for cd within backquotes without CDPATH=:
-       @if grep '` *cd ' $(srcdir)/automake.in $(srcdir)/*.am \
+       @if grep -n '` *cd ' $(srcdir)/automake.in $(srcdir)/*.am \
              $(srcdir)/m4/*.m4; then \
          echo "Consider setting CDPATH in the lines above" 1>&2; \
          exit 1; \
        fi
+## Using @_ in a scalar context is most probably a programming error.
+       @if grep -Hn '[^) ] *= address@hidden' $(srcdir)/automake.in; then \
+         echo "Using @_ in a scalar context in the lines above." 1>&2; \
+         exit 1; \
+       fi
 
 # Tag before making distribution.  Also, don't make a distribution if
 # checks fail.  Also, make sure the NEWS file is up-to-date.
-cvs-dist: maintainer-check perl4-check distcheck
+cvs-dist: maintainer-check distcheck
        @if sed 1q $(srcdir)/NEWS | grep -e "$(VERSION)" > /dev/null; then :; 
else \
          echo "NEWS not updated; not releasing" 1>&2; \
          exit 1;                               \
Index: tests/Makefile.in
--- tests/Makefile.in Wed, 31 Jan 2001 22:34:58 +0100 akim (am/h/14_Makefile.i 
1.3 644)
+++ tests/Makefile.in Fri, 02 Feb 2001 07:18:46 +0100 akim (am/h/14_Makefile.i 
1.3 644)
@@ -344,7 +344,7 @@
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 CONFIG_CLEAN_FILES = 
 DIST_SOURCES = 
-DIST_COMMON =  ChangeLog Makefile.am Makefile.in
+DIST_COMMON =  Makefile.in ChangeLog Makefile.am
 
 
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
Index: m4/Makefile.in
--- m4/Makefile.in Wed, 31 Jan 2001 22:34:58 +0100 akim (am/h/15_Makefile.i 1.3 
644)
+++ m4/Makefile.in Fri, 02 Feb 2001 07:18:46 +0100 akim (am/h/15_Makefile.i 1.3 
644)
@@ -86,7 +86,7 @@
 DIST_SOURCES = 
 DATA =  $(m4data_DATA)
 
-DIST_COMMON =  Makefile.am Makefile.in
+DIST_COMMON =  Makefile.in Makefile.am
 
 
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
Index: Makefile.in
--- Makefile.in Wed, 31 Jan 2001 22:34:58 +0100 akim (am/h/16_Makefile.i 1.3 
644)
+++ Makefile.in Fri, 02 Feb 2001 07:22:57 +0100 akim (am/h/16_Makefile.i 1.3 
644)
@@ -636,12 +636,6 @@
 
 ################################################################
 
-# Run the test suite using Perl 4.
-perl4-check: automake aclocal
-       @if $(SHELL) -c 'perl4.036 -v' > /dev/null 2>&1; then \
-         $(MAKE) PERL=perl4.036 check; \
-       else :; fi
-
 # Some simple checks, and then ordinary check.  These are only really
 # guaranteed to work on my machine.
 maintainer-check: automake aclocal
@@ -652,35 +646,39 @@
        fi
        $(PERL) -c -w automake
        $(PERL) -c -w aclocal
-       @if test `fgrep '\$${' $(srcdir)/[a-z]*.am | fgrep -v '$$$$' | wc -l` 
-ne 0; then \
-         echo "found too many uses of '\$${'" 1>&2; \
+       @if fgrep '\$${' $(srcdir)/[a-z]*.am | \
+              fgrep -v '$$$$' | \
+              grep . ; then \
+         echo "Found too many uses of '\$${' in the lines above." 1>&2; \
          exit 1;                               \
        else :; fi
-       @if test `fgrep 'mkinstalldirs' $(srcdir)/[a-z]*.am | fgrep -v 
'$$(mkinstalldirs)' | wc -l` -ne 0; then \
-         echo "found incorrect use of mkinstalldirs" 1>&2; \
+       @if fgrep -n 'mkinstalldirs' $(srcdir)/[a-z]*.am | \
+             fgrep -v '$$(mkinstalldirs)' | \
+             grep . ; then \
+         echo "Found incorrect use of mkinstalldirs in the lines above" 1>&2; \
          exit 1; \
        else :; fi
-       @if $(SHELL) -c 'perl4.036 -v' >/dev/null 2>&1; then \
-         perl4.036 -c -w automake; \
-         perl4.036 -c -w aclocal; \
-       else :; fi
-       @if grep -w undef $(srcdir)/automake.in > /dev/null 2>&1; then \
+       @if grep -n -w undef $(srcdir)/automake.in; then \
          echo "Found undef in automake.in; use delete instead" 1>&2; \
          exit 1; \
        fi
-       @if fgrep 'split (/ /' $(srcdir)/automake.in > /dev/null 2>&1; then \
-         echo "Found bad split in automake.in" 1>&2; \
+       @if fgrep -n 'split (/ /' $(srcdir)/automake.in; then \
+         echo "Found bad split in the lines above." 1>&2; \
          exit 1; \
        fi
-       @if grep '` *cd ' $(srcdir)/automake.in $(srcdir)/*.am \
+       @if grep -n '` *cd ' $(srcdir)/automake.in $(srcdir)/*.am \
              $(srcdir)/m4/*.m4; then \
          echo "Consider setting CDPATH in the lines above" 1>&2; \
          exit 1; \
        fi
+       @if grep -Hn '[^) ] *= address@hidden' $(srcdir)/automake.in; then \
+         echo "Using @_ in a scalar context in the lines above." 1>&2; \
+         exit 1; \
+       fi
 
 # Tag before making distribution.  Also, don't make a distribution if
 # checks fail.  Also, make sure the NEWS file is up-to-date.
-cvs-dist: maintainer-check perl4-check distcheck
+cvs-dist: maintainer-check distcheck
        @if sed 1q $(srcdir)/NEWS | grep -e "$(VERSION)" > /dev/null; then :; 
else \
          echo "NEWS not updated; not releasing" 1>&2; \
          exit 1;                               \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]