]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Fix years in copyright notices.
authorEric Blake <ebb9@byu.net>
Tue, 27 Jan 2009 23:13:55 +0000 (16:13 -0700)
committerEric Blake <ebb9@byu.net>
Wed, 28 Jan 2009 13:12:52 +0000 (06:12 -0700)
* lib/m4sugar/m4sugar.m4 (m4_copyright_condense): New macro,
undocumented for now.
* lib/m4sugar/Makefile.am (version.m4): Add m4_PACKAGE_YEAR,
m4_PACKAGE_URL.
(RELEASE_YEAR): New macro, copied from bin/Makefile.am.
* lib/autoconf/general.m4 (_AC_COPYRIGHT_YEARS): New macro.
(AC_COPYRIGHT): Add undocumented third parameter.
(_AC_INIT_COPYRIGHT): Avoid need to bump copyright years.
* lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Likewise.
* lib/autotest/general.m4 (AT_INIT): Likewise.
* lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Likewise.
(AT_COPYRIGHT): Add undocumented third parameter.
* tests/local.at (AT_COPYRIGHT): Don't add an extra copyright
parameter; the generic copyright given by autotest is sufficient
since we are the package that owns autotest.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/autoconf/autotest.m4
lib/autoconf/general.m4
lib/autoconf/status.m4
lib/autotest/general.m4
lib/m4sugar/Makefile.am
lib/m4sugar/m4sugar.m4
tests/local.at

index e550b269fe8daf8f526a77c34eb27aa369df8c81..2885f2789af6aaf5809f41c63c26727b96e8a6ba 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2009-01-28  Eric Blake  <ebb9@byu.net>
+
+       Fix years in copyright notices.
+       * lib/m4sugar/m4sugar.m4 (m4_copyright_condense): New macro,
+       undocumented for now.
+       * lib/m4sugar/Makefile.am (version.m4): Add m4_PACKAGE_YEAR,
+       m4_PACKAGE_URL.
+       (RELEASE_YEAR): New macro, copied from bin/Makefile.am.
+       * lib/autoconf/general.m4 (_AC_COPYRIGHT_YEARS): New macro.
+       (AC_COPYRIGHT): Add undocumented third parameter.
+       (_AC_INIT_COPYRIGHT): Avoid need to bump copyright years.
+       * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Likewise.
+       * lib/autotest/general.m4 (AT_INIT): Likewise.
+       * lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Likewise.
+       (AT_COPYRIGHT): Add undocumented third parameter.
+       * tests/local.at (AT_COPYRIGHT): Don't add an extra copyright
+       parameter; the generic copyright given by autotest is sufficient
+       since we are the package that owns autotest.
+
 2009-01-27  Eric Blake  <ebb9@byu.net>
 
        Use URLs in --help output, part 3: testsuite.
index d4b2f4d933d19bd6dfb2ebbceb43ac16e239d494..72b4b7fb3cc2a48515f89394e58732c2db56e0cb 100644 (file)
@@ -1,7 +1,7 @@
 # This file is part of Autoconf.                       -*- Autoconf -*-
 # Interface with Autotest.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2009 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -66,7 +66,7 @@ AC_DEFUN([AC_CONFIG_TESTDIR],
 [cat >$1/atconfig <<ATEOF
 @%:@ Configurable variable values for building test suites.
 @%:@ Generated by $[0].
-@%:@ Copyright (C) 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
+@%:@ Copyright (C) m4_PACKAGE_YEAR Free Software Foundation, Inc.
 
 # The test suite will define top_srcdir=$at_top_srcdir/../.. etc.
 at_testdir='$1'
index b1c41ba0304911045d33c1714e3f2a859d149f2e..cb7e5c2a6ea7d3e541237e03b0f2a620e5c26500 100644 (file)
@@ -1,8 +1,9 @@
 # This file is part of Autoconf.                       -*- Autoconf -*-
 # Parameterized macros.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
-# Foundation, Inc.
+m4_define([_AC_COPYRIGHT_YEARS],
+[Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+Foundation, Inc.])
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -275,16 +276,17 @@ m4_ifndef([AC_PACKAGE_URL],
 ])
 
 
-# AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER])
+# AC_COPYRIGHT(TEXT, [VERSION-DIVERSION = VERSION_USER],
+#              [FILTER = m4_newline])
 # ------------------------------------------------------
 # Emit TEXT, a copyright notice, in the top of `configure' and in
-# --version output.  Macros in TEXT are evaluated once.
+# --version output.  Macros in TEXT are evaluated once.  Process
+# the --version output through FILTER (m4_newline, m4_do, and
+# m4_copyright_condense are common filters).
 m4_define([AC_COPYRIGHT],
-[AS_COPYRIGHT([$1])[]dnl
-m4_divert_text(m4_default([$2], [VERSION_USER]),
-[
-$1])dnl
-])# AC_COPYRIGHT
+[AS_COPYRIGHT([$1])[]]dnl
+[m4_divert_text(m4_default_quoted([$2], [VERSION_USER]),
+[m4_default([$3], [m4_newline])([$1])])])# AC_COPYRIGHT
 
 
 # AC_REVISION(REVISION-INFO)
@@ -368,14 +370,12 @@ m4_ifset([AC_PACKAGE_BUGREPORT],
 # We dump to VERSION_FSF to make sure we are inserted before the
 # user copyrights, and after the setup of the --version handling.
 m4_define([_AC_INIT_COPYRIGHT],
-[AC_COPYRIGHT(
-[Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
-Foundation, Inc.
-This configure script is free software; the Free Software Foundation
+[AC_COPYRIGHT(m4_defn([_AC_COPYRIGHT_YEARS]), [VERSION_FSF], [
+m4_copyright_condense])dnl
+AC_COPYRIGHT(
+[This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.],
-             [VERSION_FSF])dnl
-])
+            [VERSION_FSF], [m4_echo])])
 
 
 # File Descriptors
index 6ed33a0aec85b18b103167e14245534348884e0f..6e5a90496994416c340348670a125902280eee94 100644 (file)
@@ -1444,7 +1444,7 @@ m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
 configured by $[0], generated by m4_PACKAGE_STRING,
   with options \\"`AS_ECHO(["$ac_configure_args"]) | sed 's/^ //; s/[[\\""\`\$]]/\\\\&/g'`\\"
 
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) m4_PACKAGE_YEAR Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
index a53c394e53eeae0b9dcdc887abe2ef5d6982c084..86a5c6aa2bbd7bd13123a06fb320ffc69b12ac0e 100644 (file)
@@ -224,10 +224,12 @@ dnl This trick removes that banner, since it adds nothing to autotest.
 [m4_cleardivert([BODY])]dnl
 [AS_ME_PREPARE[]]dnl
 [m4_divert_push([DEFAULTS])]dnl
-[AT_COPYRIGHT(m4_defn([_AT_COPYRIGHT_YEARS])[
-This test suite is free software; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.])
-AS_PREPARE
+[AT_COPYRIGHT(m4_defn([_AT_COPYRIGHT_YEARS]), [
+m4_copyright_condense])]
+[AT_COPYRIGHT(
+[This test suite is free software; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.], [m4_echo])]
+[AS_PREPARE
 
 SHELL=${CONFIG_SHELL-/bin/sh}
 
@@ -1717,15 +1719,16 @@ m4_define([AT_TESTED],
 [m4_append_uniq_w([AT_tested], [$1])])
 
 
-# AT_COPYRIGHT(TEXT)
-# ------------------
+# AT_COPYRIGHT(TEXT, [FILTER = m4_newline])
+# -----------------------------------------
 # Emit TEXT, a copyright notice, in the top of the test suite and in
-# --version output.  Macros in TEXT are evaluated once.
+# --version output.  Macros in TEXT are evaluated once.  Process
+# the --version output through FILTER (m4_newline, m4_do, and
+# m4_copyright_condense are common filters).
 m4_define([AT_COPYRIGHT],
-[AS_COPYRIGHT([$1])[]dnl
-m4_divert_text([VERSION_NOTICES],
-[
-$1])])# AT_COPYRIGHT
+[AS_COPYRIGHT([$1])[]]dnl
+[m4_divert_text([VERSION_NOTICES],
+[m4_default([$2], [m4_newline])([$1])])])# AT_COPYRIGHT
 
 
 # AT_SETUP(DESCRIPTION)
index 98654a0acefd3b8d7e0fc1da53842a0a4d6a5c57..5458ef4b15a571c4c9a078bd9c659ed9eb96a1d0 100644 (file)
@@ -1,6 +1,7 @@
 # Make Autoconf library for M4sugar.
 
-# Copyright (C) 2001, 2002, 2006, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2006, 2007, 2008, 2009 Free Software
+# Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,6 +21,10 @@ dist_m4sugarlib_DATA = m4sugar.m4 foreach.m4 m4sh.m4
 nodist_m4sugarlib_DATA = version.m4 m4sugar.m4f m4sh.m4f
 CLEANFILES = $(nodist_m4sugarlib_DATA)
 
+# Get the release year from ../ChangeLog.
+RELEASE_YEAR = \
+  `sed 's/^\([0-9][0-9][0-9][0-9]\).*/\1/;q' $(top_srcdir)/ChangeLog`
+
 ## ------------ ##
 ## version.m4.  ##
 ## ------------ ##
@@ -29,14 +34,16 @@ version.m4: Makefile
        :;{ \
          echo '# This file is part of -*- Autoconf -*-.' && \
          echo '# Version of Autoconf.' && \
-         echo '# Copyright (C) 1999, 2000, 2001, 2002, 2006, 2007' && \
+         echo '# Copyright (C) 1999, 2000, 2001, 2002, 2006, 2007, 2009' && \
          echo '# Free Software Foundation, Inc.' && \
          echo  &&\
          echo 'm4_define([m4_PACKAGE_NAME],      [$(PACKAGE_NAME)])' && \
          echo 'm4_define([m4_PACKAGE_TARNAME],   [$(PACKAGE_TARNAME)])' && \
          echo 'm4_define([m4_PACKAGE_VERSION],   [$(PACKAGE_VERSION)])' && \
          echo 'm4_define([m4_PACKAGE_STRING],    [$(PACKAGE_STRING)])' && \
-         echo 'm4_define([m4_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
+         echo 'm4_define([m4_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])' && \
+         echo 'm4_define([m4_PACKAGE_URL],       [$(PACKAGE_URL)])' && \
+         echo 'm4_define([m4_PACKAGE_YEAR],      ['$(RELEASE_YEAR)'])'; \
        } > $@-t
        mv $@-t $@
 
index 2ea42d809a69ada180a270ba92a8675ac417194a..183c8a62ca46c2111f01e2b416154eefddae7da9 100644 (file)
@@ -2587,6 +2587,13 @@ m4_if(m4_index([$1], [@]), [-1], [m4_len([$1])],
                           [@\(\(<:\|:>\|S|\|%:\|\{:\|:\}\)\(@\)\|&t@\)],
                           [\3]))]))_m4_defn([m4_qlen-$1])])
 
+# m4_copyright_condense(TEXT)
+# ---------------------------
+# Condense the copyright notice in TEXT to only display the final
+# year, wrapping the results to fit in 80 columns.
+m4_define([m4_copyright_condense],
+[m4_text_wrap(m4_bpatsubst(m4_flatten([[$1]]),
+[(C)[-  ,0-9]*\([1-9][0-9][0-9][0-9]\)], [(C) \1]))])
 
 ## ----------------------- ##
 ## 13. Number processing.  ##
index ba81e7c0c5e5b06e2fd9162c56524cca5d417c75..dffeebf45ae77a8841c541ba597d46fb2ed58410 100644 (file)
@@ -1,7 +1,7 @@
 # M4 macros used in building Autoconf test suites.        -*- Autotest -*-
 
-# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+# 2009 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -521,8 +521,3 @@ AT_CLEANUP[]dnl
 ## ----------------------- ##
 
 AT_INIT
-AT_COPYRIGHT(
-[Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-Free Software Foundation, Inc.
-This is free software; see the source for copying conditions.  There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.])