Use the release year, not the current year.
authorJim Meyering <jim@meyering.net>
Thu, 4 Jan 2007 14:34:29 +0000 (15:34 +0100)
committerJim Meyering <jim@meyering.net>
Thu, 4 Jan 2007 14:34:29 +0000 (15:34 +0100)
* src/groups.sh (version): Use a better name: @RELEASE_YEAR@.
* src/Makefile.am (RELEASE_YEAR): Define it.
(.sh): Use it.
Thanks to a prod from Eric Blake.

ChangeLog
src/Makefile.am
src/groups.sh

index ac3be26..4fb6c52 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2007-01-04  Jim Meyering  <jim@meyering.net>
 
+       Use the release year, not the current year.
+       * src/groups.sh (version): Use a better name: @RELEASE_YEAR@.
+       * src/Makefile.am (RELEASE_YEAR): Define it.
+       (.sh): Use it.
+       Thanks to a prod from Eric Blake.
+
        Ensure that "group --version" always prints the current year.
        * src/groups.sh (version): Use @CURRENT_YEAR@, rather than 2006.
        * src/Makefile.am (.sh): Also substitute for @CURRENT_YEAR@.
index ddd13ef..7aa504b 100644 (file)
@@ -115,11 +115,16 @@ $(PROGRAMS): ../lib/libcoreutils.a
 
 SUFFIXES = .sh
 
+# Get the release year from ../lib/version-etc.c.
+RELEASE_YEAR = \
+  `sed -n '/.*COPYRIGHT_YEAR = \([0-9][0-9][0-9][0-9]\) };/s//\1/p' \
+    $(top_srcdir)/lib/version-etc.c`
+
 .sh:
        rm -f $@ $@-t
        sed \
          -e 's!@''bindir''@!$(bindir)!' \
-         -e 's/@''CURRENT_YEAR'@/`date +%Y`/ \
+         -e 's/@''RELEASE_YEAR'@/$(RELEASE_YEAR)/ \
          -e 's/@''GNU_PACKAGE''@/$(GNU_PACKAGE)/' \
          -e 's/@''PACKAGE_BUGREPORT''@/$(PACKAGE_BUGREPORT)/' \
          -e 's/@''VERSION''@/$(VERSION)/' $< > $@-t
index f416fdb..dd32c63 100755 (executable)
@@ -32,7 +32,7 @@ Same as id -Gn.  If no USERNAME, use current process.
 Report bugs to <@PACKAGE_BUGREPORT@>."
 
 version='groups (@GNU_PACKAGE@) @VERSION@
-Copyright (C) @CURRENT_YEAR@ Free Software Foundation, Inc.
+Copyright (C) @RELEASE_YEAR@ Free Software Foundation, Inc.
 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>.
 There is NO WARRANTY, to the extent permitted by law.