* build-aux/update-copyright: Resynchronize from upstream.
* maint.mk (update-copyright): Simplify based on gnulib.
(update-copyright-env): New variable.
* cfg.mk (update-copyright-exclude-regexp): Delete.
(update-copyright-env): New override.
* .x-update-copyright: New file.
* lib/Autom4te/Makefile.am: Add copyright.
* lib/Autom4te/Channels.pm: Revert copyright update to upstream
file.
* lib/Autom4te/Configure_ac.pm: Likewise.
* lib/Autom4te/FileUtils.pm: Likewise.
* lib/Autom4te/Struct.pm: Likewise.
* lib/Autom4te/XFile.pm: Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
--- /dev/null
+# Prior year changelogs don't need update.
+ChangeLog..*
+# Upstream files that should not have copyright updated here.
+COPYING.*
+GNUmakefile
+build-aux/.*
+lib/Autom4te/Configure_ac.pm
+lib/Autom4te/Channels.pm
+lib/Autom4te/FileUtils.pm
+lib/Autom4te/Struct.pm
+lib/Autom4te/XFile.pm
+doc/fdl.*
+doc/gendocs_template
+doc/gnu-oids.texi
+doc/make-stds.texi
+doc/standards.texi
2009-08-14 Eric Blake <ebb9@byu.net>
+ Improve copyright updating.
+ * build-aux/update-copyright: Resynchronize from upstream.
+ * maint.mk (update-copyright): Simplify based on gnulib.
+ (update-copyright-env): New variable.
+ * cfg.mk (update-copyright-exclude-regexp): Delete.
+ (update-copyright-env): New override.
+ * .x-update-copyright: New file.
+ * lib/Autom4te/Makefile.am: Add copyright.
+ * lib/Autom4te/Channels.pm: Revert copyright update to upstream
+ file.
+ * lib/Autom4te/Configure_ac.pm: Likewise.
+ * lib/Autom4te/FileUtils.pm: Likewise.
+ * lib/Autom4te/Struct.pm: Likewise.
+ * lib/Autom4te/XFile.pm: Likewise.
+
Update copyright.
* AUTHORS: Include 2009 in copyright.
* lib/Autom4te/C4che.pm: Likewise.
Prepare to bulk update copyright years.
* build-aux/update-copyright: New file.
* cfg.mk (gnulib-update): Sync it from gnulib.
- (update-copyright-exclude-regexp): New varialbe.
+ (update-copyright-exclude-regexp): New variable.
(web-manual): Move...
* maint.mk (web-manual): ...here, to match gnulib.
(update-copyright): New target, copied from gnulib's
#!/usr/bin/perl -0777 -pi
# Update an FSF copyright year list to include the current year.
-my $VERSION = '2009-08-14.05:03'; # UTC
+my $VERSION = '2009-08-14.18:56'; # UTC
# Copyright (C) 2009 Free Software Foundation, Inc.
#
# use the update-copyright target rule in maint.mk from gnulib's
# maintainer-makefile module.
#
-# Iff an FSF copyright statement is discovered in a file and the final
+# Iff an FSF copyright statement is recognized in a file and the final
# year is not the current year, then the statement is updated for the
-# new year, 2-digit years are converted to 4-digit years by prepending
-# "19", and the statement is reformatted to fit within 72 columns. A
-# warning is printed for every file for which no FSF copyright statement
-# is discovered.
+# new year and it is reformatted to:
+#
+# 1. Fit within 72 columns.
+# 2. Convert 2-digit years to 4-digit years by prepending "19".
+# 3. Expand copyright year intervals. (See "Environment variables"
+# below.)
+#
+# A warning is printed for every file for which no FSF copyright
+# statement is recognized.
#
# Each file's FSF copyright statement must be formated correctly in
# order to be recognized. For example, each of these is fine:
# 6. Blank lines, even if preceded by the prefix, do not appear
# within the FSF copyright statement.
# 7. Each copyright year is 2 or 4 digits, and years are separated by
-# commas or dashes. Whitespace may occur after commas.
+# commas or dashes. Whitespace may appear after commas.
#
# Environment variables:
#
-# 1. If UPDATE_COPYRIGHT_USE_INTERVALS=1, every series of consecutive
-# copyright years (such as 90, 1991, 1992-2007, 2008) in an updated
-# FSF copyright statement is collapsed to a single interval (such
-# as 1990-2008). If unset or set to 0, all existing copyright year
-# intervals are expanded.
-# 2. For testing purposes, you can set the assumed current year in
+# 1. If UPDATE_COPYRIGHT_FORCE=1, a recognized FSF copyright statement
+# is reformatted even if it does not need updating for the new
+# year. If unset or set to 0, only updated FSF copyright
+# statements are reformatted.
+# 2. If UPDATE_COPYRIGHT_USE_INTERVALS=1, every series of consecutive
+# copyright years (such as 90, 1991, 1992-2007, 2008) in a
+# reformatted FSF copyright statement is collapsed to a single
+# interval (such as 1990-2008). If unset or set to 0, all existing
+# copyright year intervals in a reformatted FSF copyright statement
+# are expanded instead.
+# 3. For testing purposes, you can set the assumed current year in
# UPDATE_COPYRIGHT_YEAR.
use strict;
{
# Update the year.
$stmt =~ s/$final_year_orig/$final_year, $this_year/;
-
+ }
+ if ($final_year != $this_year || $ENV{'UPDATE_COPYRIGHT_FORCE'})
+ {
# Normalize all whitespace including newline-prefix sequences.
$stmt =~ s/$ws_re/ /g;
local-checks-to-skip ?= \
changelog-check sc_unmarked_diagnostics
-# Don't adjust copyright in upstream files.
-update-copyright-exclude-regexp = \
-(^|/)(COPYING|build-aux/|GNUmakefile\
-|Autom4te/(Configure_ac|Channels|FileUtils|Struct|XFile)\
-|doc/(fdl|gendocs|gnu-oids|make-stds|standards)).*$$
+# Always use longhand copyrights.
+update-copyright-env = UPDATE_COPYRIGHT_USE_INTERVALS=0
-# Copyright (C) 2002, 2004, 2006, 2008, 2009 Free Software Foundation,
-# Inc.
+# Copyright (C) 2002, 2004, 2006, 2008 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
-# Copyright (C) 2003, 2005, 2006, 2008, 2009 Free Software Foundation,
-# Inc.
+# Copyright (C) 2003, 2005, 2006 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
-# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
-# Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 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
## Process this file with automake to create Makefile.in
+# Copyright (C) 2001, 2003, 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
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
perllibdir = $(pkgdatadir)/Autom4te
dist_perllib_DATA = \
C4che.pm \
# autoconf -- create `configure' using m4 macros
-# Copyright (C) 2001, 2002, 2006, 2008, 2009 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001, 2002, 2006 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
"$(PACKAGE_NAME) - $(manual_title)"
@echo " *** Upload the doc/manual directory to web-cvs."
-# If you have an additional project-specific rule,
-# define it in cfg.mk and set this variable to its name.
-update-copyright-local ?=
+# If you want to set UPDATE_COPYRIGHT_* environment variables,
+# put the assignments in this variable.
+update-copyright-env ?=
# Run this rule once per year (usually early in January)
# to update all FSF copyright year lists in your project.
-update-copyright-exclude-regexp ?= (^|/)COPYING$$
+# If you have an additional project-specific rule,
+# add it in cfg.mk along with a line 'update-copyright: prereq'.
+# By default, exclude all variants of COPYING; you can also
+# add exemptions (such as ChangeLog..* for rotated change logs)
+# in the file .x-update-copyright.
.PHONY: update-copyright
-update-copyright: $(update-copyright-local)
+update-copyright:
grep -l -w Copyright $$($(VC_LIST_EXCEPT)) \
- | grep -v -E '$(update-copyright-exclude-regexp)' \
- | xargs $(build_aux)/$@
+ $(srcdir)/ChangeLog | grep -v COPYING \
+ | $(update-copyright-env) xargs $(build_aux)/$@