diff options
author | Joel E. Denny <joeldenny@joeldenny.org> | 2011-01-02 08:17:44 -0500 |
---|---|---|
committer | Joel E. Denny <joeldenny@joeldenny.org> | 2011-01-02 09:40:39 -0500 |
commit | f52e1e5e44fd155cfe0fbbf0fd370e99a256c20e (patch) | |
tree | f3a064fbecb2265e4b66b6c33210f69e4124002a | |
parent | 210c1eef22bc58d0b3e40f37db129bf44a2b45d1 (diff) | |
download | bison-f52e1e5e44fd155cfe0fbbf0fd370e99a256c20e.tar.gz |
maint: prepare to use date ranges in copyright notices.
* README (Copyright statements): New section explaining the range
notation. The GNU coding standards require this explanation. I
copied ours from coreutils.
* build-aux/update-b4-copyright: Revert 2010-06-17 changes that
disabled Bison's automated use of ranges.
* cfg.mk (update-copyright-env): Likewise.
(cherry picked from commit cb3f7f335aa69ba3e6478fea8d4591f4f6d43bc5)
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | README | 4 | ||||
-rwxr-xr-x | build-aux/update-b4-copyright | 17 | ||||
-rw-r--r-- | cfg.mk | 2 |
4 files changed, 28 insertions, 5 deletions
@@ -1,5 +1,15 @@ 2011-01-02 Joel E. Denny <joeldenny@joeldenny.org> + maint: prepare to use date ranges in copyright notices. + * README (Copyright statements): New section explaining the range + notation. The GNU coding standards require this explanation. I + copied ours from coreutils. + * build-aux/update-b4-copyright: Revert 2010-06-17 changes that + disabled Bison's automated use of ranges. + * cfg.mk (update-copyright-env): Likewise. + +2011-01-02 Joel E. Denny <joeldenny@joeldenny.org> + Correct my email address. * ChangeLog: In all recent entries. * THANKS (Joel E. Denny): Here. @@ -33,6 +33,10 @@ Please send bug reports to <bug-bison@gnu.org>. Please include the version number from `bison --version', and a complete, self-contained test case in each bug report. +* Copyright statements +For any copyright year range specified as YYYY-ZZZZ in this package, +note that the range specifies every single year in that closed interval. + Local Variables: mode: outline diff --git a/build-aux/update-b4-copyright b/build-aux/update-b4-copyright index 63a33359..ea82de4f 100755 --- a/build-aux/update-b4-copyright +++ b/build-aux/update-b4-copyright @@ -73,10 +73,19 @@ while (/($old_re)/gx) # Put spaces after commas. $year_lines =~ s/, ?/, /g; - # Do not compress to intervals; for example, do not replace - # "2008, 2009, 2010" with "2008-2010". See the Copyright - # Notices section in Information for Maintainers of GNU Software, at: - # http://www.gnu.org/prep/maintain/maintain.html#Copyright-Notices + # Compress to intervals. + $year_lines =~ + s/ + (\d{4}) + (?: + (,\ |-) + ((??{ + if ($2 eq '-') { '\d{4}'; } + elsif (!$3) { $1 + 1; } + else { $3 + 1; } + })) + )+ + /$1-$3/gx; # Format within margin. my $year_lines_new; @@ -50,4 +50,4 @@ announcement_Cc_ = \ update-copyright: update-b4-copyright update-package-copyright-year update-copyright-env = \ - UPDATE_COPYRIGHT_FORCE=1 + UPDATE_COPYRIGHT_FORCE=1 UPDATE_COPYRIGHT_USE_INTERVALS=1 |