Subject: bug#11932: Remove "#serial" lines from Automake-provided *.m4 files

From: Stefano Lattarini <[email-masked]>
Date: Sat, 14 Jul 2012 19:04:07 +0200

tags 11932 + patch
close 11932

On 07/13/2012 03:19 PM, Stefano Lattarini wrote:
> Severity: minor
> 
> The "# serial" lines are only considered by aclocal for the system-wide
> third-party '.m4' files, not for the Automake-provided ones (and even in
> that case, they are considered only when the '--install' aclocal option
> is used).  So they serve no real purpose in the Automake '.m4' files.
> 
> In addition, now that we use git and topic branches, and that we are
> also writing the Automake-NG fork, the "# serial" lines are becoming
> more and more unreliable (different version of the same file in
> different branches can easily end up having the same serial numbers).
> 
> So I propose we just nuke the "#serial" lines.
> 
> Any objection?  If not, I will proceed in a couple of days, in all
> of the 'maint', 'master' and 'ng/master' branches.
> 
>
Done in the attached patch (pushed to maint).

Regards,
  Stefano
>From 6e3c0b92fdef5119ea2ca508061a9b46ef4c251b Mon Sep 17 00:00:00 2001
Message-Id: <6e3c0b92f[email-masked]>
From: Stefano Lattarini <[email-masked]>
Date: Sat, 14 Jul 2012 18:49:25 +0200
Subject: [PATCH] m4: get rid of "# serial" lines

The "#serial" lines are only considered by aclocal for the system-wide
third-party '.m4' files, not for the Automake-provided ones.  So they
serve no real purpose in the Automake '.m4' files.

In addition, now that we use git and topic branches, and that we are also
writing the Automake-NG fork, the "#serial" lines are becoming more and
more unreliable (e.g., different version of the same file in different
branches can easily end up having the same serial numbers).

So let's just nuke all the "#serial" lines.  See also automake bug#11932.

* m4/*.m4: All "# serial" lines removed.

Signed-off-by: Stefano Lattarini <[email-masked]>
---
 NEWS             |    6 ++++++
 m4/amversion.m4  |    2 --
 m4/ar-lib.m4     |    2 --
 m4/as.m4         |    2 --
 m4/auxdir.m4     |    2 --
 m4/ccstdc.m4     |    2 --
 m4/cond-if.m4    |    3 ---
 m4/cond.m4       |    2 --
 m4/depend.m4     |    1 -
 m4/depout.m4     |    1 -
 m4/dmalloc.m4    |    2 --
 m4/gcj.m4        |    2 --
 m4/header.m4     |    2 --
 m4/init.m4       |    2 --
 m4/install-sh.m4 |    2 --
 m4/lead-dot.m4   |    2 --
 m4/lex.m4        |    2 --
 m4/lispdir.m4    |    2 --
 m4/maintainer.m4 |    2 --
 m4/make.m4       |    2 --
 m4/minuso.m4     |    2 --
 m4/missing.m4    |    3 ---
 m4/mkdirp.m4     |    2 --
 m4/obsol-gt.m4   |    2 --
 m4/obsol-lt.m4   |    2 --
 m4/obsolete.m4   |    2 --
 m4/options.m4    |    2 --
 m4/protos.m4     |    2 --
 m4/python.m4     |    1 -
 m4/runlog.m4     |    2 --
 m4/sanity.m4     |    2 --
 m4/silent.m4     |    2 --
 m4/strip.m4      |    2 --
 m4/substnot.m4   |    2 --
 m4/tar.m4        |    2 --
 m4/upc.m4        |    2 --
 m4/vala.m4       |    2 --
 37 files changed, 6 insertions(+), 71 deletions(-)

diff --git a/NEWS b/NEWS
index a18e36e..77344f8 100644
--- a/NEWS
+++ b/NEWS
@@ -66,6 +66,12 @@ New in 1.12.3:
     giving more useful warnings than a bare "command not found" from a
     make recipe would.
 
+* M4 files:
+
+  - The '.m4' files provided by Automake does not define serial numbers
+    anymore.  This should cause no difference in the behaviour of aclocal
+    though.
+
 * Automake Testsuite:
 
   - Some testsuite weaknesses and spurious failures have been fixed.
diff --git a/m4/amversion.m4 b/m4/amversion.m4
index 3182ffb..4dbc326 100644
--- a/m4/amversion.m4
+++ b/m4/amversion.m4
@@ -6,8 +6,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
-
 # AM_AUTOMAKE_VERSION(VERSION)
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
diff --git a/m4/ar-lib.m4 b/m4/ar-lib.m4
index 470def4..b6b6b0f 100644
--- a/m4/ar-lib.m4
+++ b/m4/ar-lib.m4
@@ -5,8 +5,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 1
-
 # AM_PROG_AR([ACT-IF-FAIL])
 # -------------------------
 # Try to determine the archiver interface, and trigger the ar-lib wrapper
diff --git a/m4/as.m4 b/m4/as.m4
index fa6d3c8..27b3220 100644
--- a/m4/as.m4
+++ b/m4/as.m4
@@ -6,8 +6,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 5
-
 # AM_PROG_AS
 # ----------
 AC_DEFUN([AM_PROG_AS],
diff --git a/m4/auxdir.m4 b/m4/auxdir.m4
index 3dda02b..9cd72c3 100644
--- a/m4/auxdir.m4
+++ b/m4/auxdir.m4
@@ -6,8 +6,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
-
 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
 # $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
 # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
diff --git a/m4/ccstdc.m4 b/m4/ccstdc.m4
index d57f055..66060d9 100644
--- a/m4/ccstdc.m4
+++ b/m4/ccstdc.m4
@@ -9,8 +9,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 5
-
 # This was merged into AC_PROG_CC in Autoconf.
 
 AU_DEFUN([AM_PROG_CC_STDC],
diff --git a/m4/cond-if.m4 b/m4/cond-if.m4
index 80e687b..38f5ec9 100644
--- a/m4/cond-if.m4
+++ b/m4/cond-if.m4
@@ -6,8 +6,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
-
 # _AM_COND_IF
 # _AM_COND_ELSE
 # _AM_COND_ENDIF
@@ -17,7 +15,6 @@ m4_define([_AM_COND_IF])
 m4_define([_AM_COND_ELSE])
 m4_define([_AM_COND_ENDIF])
 
-
 # AM_COND_IF(COND, [IF-TRUE], [IF-FALSE])
 # ---------------------------------------
 # If the shell condition COND is true, execute IF-TRUE, otherwise execute
diff --git a/m4/cond.m4 b/m4/cond.m4
index 03644ab..9ea857e 100644
--- a/m4/cond.m4
+++ b/m4/cond.m4
@@ -6,8 +6,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 10
-
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
 # Define a conditional.
diff --git a/m4/depend.m4 b/m4/depend.m4
index cee3199..cd93061 100644
--- a/m4/depend.m4
+++ b/m4/depend.m4
@@ -5,7 +5,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 17
 
 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
diff --git a/m4/depout.m4 b/m4/depout.m4
index 749e592..f592b00 100644
--- a/m4/depout.m4
+++ b/m4/depout.m4
@@ -6,7 +6,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 6
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
diff --git a/m4/dmalloc.m4 b/m4/dmalloc.m4
index be1a5b3..f9d600f 100644
--- a/m4/dmalloc.m4
+++ b/m4/dmalloc.m4
@@ -9,8 +9,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 6
-
 AC_DEFUN([AM_WITH_DMALLOC],
 [AC_MSG_CHECKING([if malloc debugging is wanted])
 AC_ARG_WITH([dmalloc],
diff --git a/m4/gcj.m4 b/m4/gcj.m4
index e7cdd69..fd2a5df 100644
--- a/m4/gcj.m4
+++ b/m4/gcj.m4
@@ -7,8 +7,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
-
 AC_DEFUN([AM_PROG_GCJ],
 [AC_CHECK_TOOLS([GCJ], [gcj], [gcj])
 test -z "$GCJ" && AC_MSG_ERROR([no acceptable gcj found in \$PATH])
diff --git a/m4/header.m4 b/m4/header.m4
index 2555b96..e649ba4 100644
--- a/m4/header.m4
+++ b/m4/header.m4
@@ -5,7 +5,5 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
-
 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
diff --git a/m4/init.m4 b/m4/init.m4
index cf47e76..5e1bbe3 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -6,8 +6,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 19
-
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
 
diff --git a/m4/install-sh.m4 b/m4/install-sh.m4
index 8061e7e..f51c027 100644
--- a/m4/install-sh.m4
+++ b/m4/install-sh.m4
@@ -5,8 +5,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
-
 # AM_PROG_INSTALL_SH
 # ------------------
 # Define $install_sh.
diff --git a/m4/lead-dot.m4 b/m4/lead-dot.m4
index 8a86805..633694f 100644
--- a/m4/lead-dot.m4
+++ b/m4/lead-dot.m4
@@ -5,8 +5,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
-
 # Check whether the underlying file-system supports filenames
 # with a leading dot.  For instance MS-DOS doesn't.
 AC_DEFUN([AM_SET_LEADING_DOT],
diff --git a/m4/lex.m4 b/m4/lex.m4
index 4cda8a9..6eb4a91 100644
--- a/m4/lex.m4
+++ b/m4/lex.m4
@@ -6,8 +6,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 6
-
 # AM_PROG_LEX
 # -----------
 # Autoconf leaves LEX=: if lex or flex can't be found.  Change that to a
diff --git a/m4/lispdir.m4 b/m4/lispdir.m4
index 2dd6a0f..6dca47e 100644
--- a/m4/lispdir.m4
+++ b/m4/lispdir.m4
@@ -9,8 +9,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 11
-
 # AM_PATH_LISPDIR
 # ---------------
 AC_DEFUN([AM_PATH_LISPDIR],
diff --git a/m4/maintainer.m4 b/m4/maintainer.m4
index a8f39a3..604eb89 100644
--- a/m4/maintainer.m4
+++ b/m4/maintainer.m4
@@ -7,8 +7,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 7
-
 # AM_MAINTAINER_MODE([DEFAULT-MODE])
 # ----------------------------------
 # Control maintainer-specific portions of Makefiles.
diff --git a/m4/make.m4 b/m4/make.m4
index c4ba1a6..245c2e6 100644
--- a/m4/make.m4
+++ b/m4/make.m4
@@ -6,8 +6,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 5
-
 # AM_MAKE_INCLUDE()
 # -----------------
 # Check to see how make treats includes.
diff --git a/m4/minuso.m4 b/m4/minuso.m4
index 7787ddf..50af200 100644
--- a/m4/minuso.m4
+++ b/m4/minuso.m4
@@ -5,8 +5,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 6
-
 # AM_PROG_CC_C_O
 # --------------
 # Like AC_PROG_CC_C_O, but changed for automake.
diff --git a/m4/missing.m4 b/m4/missing.m4
index e124803..6c2a55d 100644
--- a/m4/missing.m4
+++ b/m4/missing.m4
@@ -6,8 +6,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 7
-
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
 AC_DEFUN([AM_MISSING_PROG],
@@ -15,7 +13,6 @@ AC_DEFUN([AM_MISSING_PROG],
 $1=${$1-"${am_missing_run}$2"}
 AC_SUBST($1)])
 
-
 # AM_MISSING_HAS_RUN
 # ------------------
 # Define MISSING if not defined so far and test if it supports --run.
diff --git a/m4/mkdirp.m4 b/m4/mkdirp.m4
index d362b0b..9155ace 100644
--- a/m4/mkdirp.m4
+++ b/m4/mkdirp.m4
@@ -5,8 +5,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
-
 # AM_PROG_MKDIR_P
 # ---------------
 # Check for 'mkdir -p'.
diff --git a/m4/obsol-gt.m4 b/m4/obsol-gt.m4
index bd2400d..66721d3 100644
--- a/m4/obsol-gt.m4
+++ b/m4/obsol-gt.m4
@@ -6,7 +6,5 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
-
 # See comment in obsolete.m4.
 AU_DEFUN([ud_GNU_GETTEXT], [AM_GNU_GETTEXT])
diff --git a/m4/obsol-lt.m4 b/m4/obsol-lt.m4
index af8fb1b..1fcc211 100644
--- a/m4/obsol-lt.m4
+++ b/m4/obsol-lt.m4
@@ -6,7 +6,5 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
-
 # See comment in obsolete.m4.
 AU_DEFUN([gm_PROG_LIBTOOL], [AM_PROG_LIBTOOL])
diff --git a/m4/obsolete.m4 b/m4/obsolete.m4
index 9a26cac..c77c452 100644
--- a/m4/obsolete.m4
+++ b/m4/obsolete.m4
@@ -5,8 +5,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
-
 # Obsolete Automake macros.
 
 # We put here only the macros whose substitution is not an Automake
diff --git a/m4/options.m4 b/m4/options.m4
index 76ad642..ebf3cf0 100644
--- a/m4/options.m4
+++ b/m4/options.m4
@@ -6,8 +6,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 6
-
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
 AC_DEFUN([_AM_MANGLE_OPTION],
diff --git a/m4/protos.m4 b/m4/protos.m4
index 942154b..c8c7adc 100644
--- a/m4/protos.m4
+++ b/m4/protos.m4
@@ -7,8 +7,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 6
-
 AC_DEFUN([AM_C_PROTOTYPES],
          [AC_FATAL([automatic de-ANSI-fication support has been removed])])
 
diff --git a/m4/python.m4 b/m4/python.m4
index 3548886..a247818 100644
--- a/m4/python.m4
+++ b/m4/python.m4
@@ -9,7 +9,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 9
 
 # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
 # ---------------------------------------------------------------------------
diff --git a/m4/runlog.m4 b/m4/runlog.m4
index 6d127a8..d983b71 100644
--- a/m4/runlog.m4
+++ b/m4/runlog.m4
@@ -5,8 +5,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 1
-
 # AM_RUN_LOG(COMMAND)
 # -------------------
 # Run COMMAND, save the exit status in ac_status, and log it.
diff --git a/m4/sanity.m4 b/m4/sanity.m4
index c90bc98..0415711 100644
--- a/m4/sanity.m4
+++ b/m4/sanity.m4
@@ -6,8 +6,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 9
-
 # AM_SANITY_CHECK
 # ---------------
 AC_DEFUN([AM_SANITY_CHECK],
diff --git a/m4/silent.m4 b/m4/silent.m4
index d499ecb..6746c6f 100644
--- a/m4/silent.m4
+++ b/m4/silent.m4
@@ -5,8 +5,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
-
 # AM_SILENT_RULES([DEFAULT])
 # --------------------------
 # Enable less verbose build rules; with the default set to DEFAULT
diff --git a/m4/strip.m4 b/m4/strip.m4
index 42833ca..d66f3f2 100644
--- a/m4/strip.m4
+++ b/m4/strip.m4
@@ -5,8 +5,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 2
-
 # AM_PROG_INSTALL_STRIP
 # ---------------------
 # One issue with vendor 'install' (even GNU) is that you can't
diff --git a/m4/substnot.m4 b/m4/substnot.m4
index 64d91ff..1830e79 100644
--- a/m4/substnot.m4
+++ b/m4/substnot.m4
@@ -5,8 +5,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
-
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
diff --git a/m4/tar.m4 b/m4/tar.m4
index 244c729..d3e23dd 100644
--- a/m4/tar.m4
+++ b/m4/tar.m4
@@ -6,8 +6,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
-
 # _AM_PROG_TAR(FORMAT)
 # --------------------
 # Check how to create a tarball in format FORMAT.
diff --git a/m4/upc.m4 b/m4/upc.m4
index 9ba1025..0df8197 100644
--- a/m4/upc.m4
+++ b/m4/upc.m4
@@ -6,8 +6,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 1
-
 AC_DEFUN([AM_PROG_UPC],
 [dnl We need OBJEXT and EXEEXT, but Autoconf doesn't offer any public
 dnl macro to compute them.  Use AC_PROG_CC instead.
diff --git a/m4/vala.m4 b/m4/vala.m4
index cc6ba53..5dad452 100644
--- a/m4/vala.m4
+++ b/m4/vala.m4
@@ -6,8 +6,6 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 6
-
 # Check whether the Vala compiler exists in $PATH. If it is found, the
 # variable VALAC is set. Optionally a minimum release number of the
 # compiler can be requested.
-- 
1.7.9.5