diff options
| author | Paul Eggert | 2013-12-24 10:27:53 -0800 |
|---|---|---|
| committer | Paul Eggert | 2013-12-24 10:27:53 -0800 |
| commit | 9ebada6af6d3c3c4195e6b56b3d65dcf20568fba (patch) | |
| tree | d05fc530b70ff0e6f9dc8cd091405e10e0a6aa53 /admin | |
| parent | eeef121a18b0317cbe739e104c0b024289e4b851 (diff) | |
| download | emacs-9ebada6af6d3c3c4195e6b56b3d65dcf20568fba.tar.gz emacs-9ebada6af6d3c3c4195e6b56b3d65dcf20568fba.zip | |
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 40d1e069f03..ea47a6798b5 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2013-12-24 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Automate the procedure for updating copyright year. | ||
| 4 | * merge-gnulib (GNULIB_MODULES): Add update-copyright. | ||
| 5 | * notes/years: Mention admin/update-copyright. | ||
| 6 | * update-copyright: New file. | ||
| 7 | |||
| 1 | 2013-12-24 Xue Fuqiao <xfq.free@gmail.com> | 8 | 2013-12-24 Xue Fuqiao <xfq.free@gmail.com> |
| 2 | 9 | ||
| 3 | * admin.el (add-release-logs): | 10 | * admin.el (add-release-logs): |
diff --git a/admin/merge-gnulib b/admin/merge-gnulib index af9300edbec..a86630f9e17 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib | |||
| @@ -37,7 +37,8 @@ GNULIB_MODULES=' | |||
| 37 | pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat | 37 | pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat |
| 38 | sig2str socklen stat-time stdalign stdarg stdbool stdio | 38 | sig2str socklen stat-time stdalign stdarg stdbool stdio |
| 39 | strftime strtoimax strtoumax symlink sys_stat | 39 | strftime strtoimax strtoumax symlink sys_stat |
| 40 | sys_time time timer-time timespec-add timespec-sub unsetenv utimens | 40 | sys_time time timer-time timespec-add timespec-sub |
| 41 | unsetenv update-copyright utimens | ||
| 41 | warnings | 42 | warnings |
| 42 | ' | 43 | ' |
| 43 | 44 | ||
diff --git a/admin/notes/years b/admin/notes/years index e6b38c5aefd..57cb5ad7e4f 100644 --- a/admin/notes/years +++ b/admin/notes/years | |||
| @@ -2,6 +2,8 @@ HOW TO MAINTAIN COPYRIGHT YEARS FOR GNU EMACS | |||
| 2 | 2 | ||
| 3 | Maintaining copyright years is now very simple: every time a new year | 3 | Maintaining copyright years is now very simple: every time a new year |
| 4 | rolls around, add that year to every FSF (and AIST) copyright notice. | 4 | rolls around, add that year to every FSF (and AIST) copyright notice. |
| 5 | Do this by running the 'admin/update-copyright' script on a fresh bzr | ||
| 6 | checkout. Inspect the results for plausiblity, then commit them. | ||
| 5 | 7 | ||
| 6 | There's no need to worry about whether an individual file has changed | 8 | There's no need to worry about whether an individual file has changed |
| 7 | in a given year - it's sufficient that Emacs as a whole has changed. | 9 | 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. | |||
| 28 | since Emacs 21 came out in 2001, all the subsequent years[1]. We don't | 30 | since Emacs 21 came out in 2001, all the subsequent years[1]. We don't |
| 29 | need to check whether *that file* was changed in those years. | 31 | need to check whether *that file* was changed in those years. |
| 30 | It's sufficient that *Emacs* was changed in those years (and it was!). | 32 | It's sufficient that *Emacs* was changed in those years (and it was!). |
| 31 | 33 | ||
| 32 | For those files that have been added since then, we should add | 34 | For those files that have been added since then, we should add |
| 33 | the year it was added to Emacs, and all subsequent years." | 35 | the year it was added to Emacs, and all subsequent years." |
| 34 | 36 | ||
| 35 | --RMS, 2005-07-13 | 37 | --RMS, 2005-07-13 |
| 36 | 38 | ||
| 37 | [1] Note that this includes 2001 - see | 39 | [1] Note that this includes 2001 - see |
diff --git a/admin/update-copyright b/admin/update-copyright new file mode 100755 index 00000000000..64653d97237 --- /dev/null +++ b/admin/update-copyright | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | #! /bin/sh | ||
| 2 | # Update the copyright dates in Emacs sources. | ||
| 3 | # Typical usage: | ||
| 4 | # | ||
| 5 | # admin/update-copyright | ||
| 6 | # | ||
| 7 | # By default, this script uses the local-time calendar year. | ||
| 8 | # Set the UPDATE_COPYRIGHT_YEAR environment variable to override the default. | ||
| 9 | |||
| 10 | # Copyright 2013 Free Software Foundation, Inc. | ||
| 11 | |||
| 12 | # This file is part of GNU Emacs. | ||
| 13 | |||
| 14 | # GNU Emacs is free software: you can redistribute it and/or modify | ||
| 15 | # it under the terms of the GNU General Public License as published by | ||
| 16 | # the Free Software Foundation, either version 3 of the License, or | ||
| 17 | # (at your option) any later version. | ||
| 18 | |||
| 19 | # GNU Emacs is distributed in the hope that it will be useful, | ||
| 20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 22 | # GNU General Public License for more details. | ||
| 23 | |||
| 24 | # You should have received a copy of the GNU General Public License | ||
| 25 | # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 26 | |||
| 27 | # written by Paul Eggert | ||
| 28 | |||
| 29 | # FIXME: The file 'notes/copyright' says that the AIST copyright years | ||
| 30 | # should be updated, but by inspection it appears that some should be | ||
| 31 | # updated and some should not be, due to registration numbers, so | ||
| 32 | # this script leaves these copyright years alone for now. | ||
| 33 | |||
| 34 | : ${UPDATE_COPYRIGHT_USE_INTERVALS=1} | ||
| 35 | export UPDATE_COPYRIGHT_USE_INTERVALS | ||
| 36 | |||
| 37 | : ${UPDATE_COPYRIGHT_YEAR=$(date +%Y)} | ||
| 38 | export UPDATE_COPYRIGHT_YEAR | ||
| 39 | |||
| 40 | emacsver=etc/refcards/emacsver.tex | ||
| 41 | sed 's/\\def\\year[{][0-9]*[}]/\\def\\year{'"$UPDATE_COPYRIGHT_YEAR"'}'/g \ | ||
| 42 | $emacsver >$emacsver.aux && | ||
| 43 | { cmp -s $emacsver $emacsver.aux || | ||
| 44 | cp $emacsver.aux $emacsver | ||
| 45 | } && | ||
| 46 | rm $emacsver.aux && | ||
| 47 | |||
| 48 | bzr_files=$(bzr ls -RV --kind file) && | ||
| 49 | |||
| 50 | # Do not update the copyright of files that have one or more of the | ||
| 51 | # following problems: | ||
| 52 | # . They are license files, maintained by the FSF, with their own dates. | ||
| 53 | # . Their format cannot withstand changing the contents of copyright strings. | ||
| 54 | |||
| 55 | updatable_files=$(find $bzr_files \ | ||
| 56 | ! -name COPYING \ | ||
| 57 | ! -name doclicense.texi \ | ||
| 58 | ! -name gpl.texi \ | ||
| 59 | ! -name '*-gzipped' \ | ||
| 60 | ! -name '*.ico' \ | ||
| 61 | ! -name '*.icns' \ | ||
| 62 | ! -name '*.pbm' \ | ||
| 63 | ! -name '*.pdf' \ | ||
| 64 | ! -name '*.png' \ | ||
| 65 | ! -name '*.sig' \ | ||
| 66 | ! -name '*.tar' \ | ||
| 67 | ! -name '*.tiff' \ | ||
| 68 | ! -name '*.xpm' \ | ||
| 69 | ! -name eterm-color \ | ||
| 70 | ! -name hand.cur \ | ||
| 71 | ! -name key.pub \ | ||
| 72 | ! -name key.sec \ | ||
| 73 | -print) && | ||
| 74 | |||
| 75 | build-aux/update-copyright $updatable_files | ||