maint: ensure that --version's copyright date is current
authorJim Meyering <meyering@fb.com>
Mon, 10 Jun 2013 01:35:47 +0000 (18:35 -0700)
committerJim Meyering <meyering@fb.com>
Sun, 8 Feb 2015 18:58:41 +0000 (10:58 -0800)
* cfg.mk (sc_gzip_copyright_check): Ensure we keep this copyright
year number up to date.  Reported by Paul Eggert.
* gzip.c (license_msg): Include only the current year number,
as is done in nearly every other program.

cfg.mk
gzip.c

diff --git a/cfg.mk b/cfg.mk
index f39c6fe31ad702acfd33be26f98105ea510e7ed4..1fffb58cb4813806a7df0ddb063fa270d2102748 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -56,6 +56,12 @@ sc_prohibit_emacs__indent_tabs_mode__setting:
        halt='use of emacs indent-tabs-mode: setting'                   \
          $(_sc_search_regexp)
 
+sc_gzip_copyright_check:
+       @require='Copyright \(C\) '$$(date +%Y)' Free'                  \
+       in_files=$(srcdir)/gzip.c                                       \
+       halt='out of date copyright in $(v_etc_file); update it'        \
+         $(_sc_search_regexp)
+
 include $(srcdir)/dist-check.mk
 
 exclude_file_name_regexp--sc_file_system = ^NEWS$$
diff --git a/gzip.c b/gzip.c
index d77fc4182851d3dd2aa794c477806f2ee76897b5..e69c3e0a1f468738340410dbaf56b628bd30fb57 100644 (file)
--- a/gzip.c
+++ b/gzip.c
@@ -29,7 +29,7 @@
  */
 
 static char const *const license_msg[] = {
-"Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc.",
+"Copyright (C) 2015 Free Software Foundation, Inc.",
 "Copyright (C) 1993 Jean-loup Gailly.",
 "This is free software.  You may redistribute copies of it under the terms of",
 "the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.",