diff options
author | Paul Eggert <[email protected]> | 2013-12-24 10:27:53 -0800 |
---|---|---|
committer | Paul Eggert <[email protected]> | 2013-12-24 10:27:53 -0800 |
commit | 9ebada6af6d3c3c4195e6b56b3d65dcf20568fba (patch) | |
tree | d05fc530b70ff0e6f9dc8cd091405e10e0a6aa53 /admin | |
parent | eeef121a18b0317cbe739e104c0b024289e4b851 (diff) |
Automate the procedure for updating copyright year.
* admin/merge-gnulib (GNULIB_MODULES): Add update-copyright.
* admin/notes/years: Mention admin/update-copyright.
* admin/update-copyright: New file.
* build-aux/update-copyright: New file.
* make-dist: Distribute it.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* msdos/autogen/Makefile.in: Update copyright year.
Diffstat (limited to 'admin')
-rw-r--r-- | admin/ChangeLog | 7 | ||||
-rwxr-xr-x | admin/merge-gnulib | 3 | ||||
-rw-r--r-- | admin/notes/years | 6 | ||||
-rwxr-xr-x | admin/update-copyright | 75 |
4 files changed, 88 insertions, 3 deletions
diff --git a/admin/ChangeLog b/admin/ChangeLog index 40d1e069f0..ea47a6798b 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,10 @@ +2013-12-24 Paul Eggert <[email protected]> + + Automate the procedure for updating copyright year. + * merge-gnulib (GNULIB_MODULES): Add update-copyright. + * notes/years: Mention admin/update-copyright. + * update-copyright: New file. + 2013-12-24 Xue Fuqiao <[email protected]> * admin.el (add-release-logs): diff --git a/admin/merge-gnulib b/admin/merge-gnulib index af9300edbe..a86630f9e1 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib @@ -37,7 +37,8 @@ GNULIB_MODULES=' pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat - sys_time time timer-time timespec-add timespec-sub unsetenv utimens + sys_time time timer-time timespec-add timespec-sub + unsetenv update-copyright utimens warnings ' diff --git a/admin/notes/years b/admin/notes/years index e6b38c5aef..57cb5ad7e4 100644 --- a/admin/notes/years +++ b/admin/notes/years @@ -2,6 +2,8 @@ HOW TO MAINTAIN COPYRIGHT YEARS FOR GNU EMACS Maintaining copyright years is now very simple: every time a new year rolls around, add that year to every FSF (and AIST) copyright notice. +Do this by running the 'admin/update-copyright' script on a fresh bzr +checkout. Inspect the results for plausiblity, then commit them. There's no need to worry about whether an individual file has changed in a given year - it's sufficient that Emacs as a whole has changed. @@ -28,10 +30,10 @@ but should keep the full list in a comment in the source. since Emacs 21 came out in 2001, all the subsequent years[1]. We don't need to check whether *that file* was changed in those years. It's sufficient that *Emacs* was changed in those years (and it was!). - + For those files that have been added since then, we should add the year it was added to Emacs, and all subsequent years." - + --RMS, 2005-07-13 [1] Note that this includes 2001 - see diff --git a/admin/update-copyright b/admin/update-copyright new file mode 100755 index 0000000000..64653d9723 --- /dev/null +++ b/admin/update-copyright @@ -0,0 +1,75 @@ +#! /bin/sh +# Update the copyright dates in Emacs sources. +# Typical usage: +# +# admin/update-copyright +# +# By default, this script uses the local-time calendar year. +# Set the UPDATE_COPYRIGHT_YEAR environment variable to override the default. + +# Copyright 2013 Free Software Foundation, Inc. + +# This file is part of GNU Emacs. + +# GNU Emacs 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. + +# GNU Emacs 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 GNU Emacs. If not, see <http://www.gnu.org/licenses/>. + +# written by Paul Eggert + +# FIXME: The file 'notes/copyright' says that the AIST copyright years +# should be updated, but by inspection it appears that some should be +# updated and some should not be, due to registration numbers, so +# this script leaves these copyright years alone for now. + +: ${UPDATE_COPYRIGHT_USE_INTERVALS=1} +export UPDATE_COPYRIGHT_USE_INTERVALS + +: ${UPDATE_COPYRIGHT_YEAR=$(date +%Y)} +export UPDATE_COPYRIGHT_YEAR + +emacsver=etc/refcards/emacsver.tex +sed 's/\\def\\year[{][0-9]*[}]/\\def\\year{'"$UPDATE_COPYRIGHT_YEAR"'}'/g \ + $emacsver >$emacsver.aux && +{ cmp -s $emacsver $emacsver.aux || + cp $emacsver.aux $emacsver +} && +rm $emacsver.aux && + +bzr_files=$(bzr ls -RV --kind file) && + +# Do not update the copyright of files that have one or more of the +# following problems: +# . They are license files, maintained by the FSF, with their own dates. +# . Their format cannot withstand changing the contents of copyright strings. + +updatable_files=$(find $bzr_files \ + ! -name COPYING \ + ! -name doclicense.texi \ + ! -name gpl.texi \ + ! -name '*-gzipped' \ + ! -name '*.ico' \ + ! -name '*.icns' \ + ! -name '*.pbm' \ + ! -name '*.pdf' \ + ! -name '*.png' \ + ! -name '*.sig' \ + ! -name '*.tar' \ + ! -name '*.tiff' \ + ! -name '*.xpm' \ + ! -name eterm-color \ + ! -name hand.cur \ + ! -name key.pub \ + ! -name key.sec \ + -print) && + +build-aux/update-copyright $updatable_files |