changeset 6777:d9b10884dc69

* gnulib-tool (func_version): Base copyright year on CVS date. (func_emit_copyright_notice): New function. (func_emit_lib_Makefile_am): Use it. (func_emit_tests_Makefile_am): Likewise. (func_import): Likewise.
author Eric Blake <ebb9@byu.net>
date Tue, 09 May 2006 02:38:16 +0000
parents e13d238a5fb6
children 3f44368390a2
files ChangeLog gnulib-tool
diffstat 2 files changed, 30 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-05-08  Eric Blake  <ebb9@byu.net>
+
+	* gnulib-tool (func_version): Base copyright year on CVS date.
+	(func_emit_copyright_notice): New function.
+	(func_emit_lib_Makefile_am): Use it.
+	(func_emit_tests_Makefile_am): Likewise.
+	(func_import): Likewise.
+
 2006-05-05  Bruno Haible  <bruno@clisp.org>
 
 	* build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -22,7 +22,7 @@
 
 progname=$0
 package=gnulib
-cvsdatestamp='$Date: 2006-05-02 14:31:00 $'
+cvsdatestamp='$Date: 2006-05-09 02:38:16 $'
 last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
 version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
 
@@ -136,13 +136,29 @@
 # outputs to stdout the --version message.
 func_version ()
 {
+  year=`echo "$last_checkin_date" | sed -e 's,/.*$,,'`
   echo "$progname (GNU $package) $version"
-  echo "Copyright (C) 2002-2005 Free Software Foundation, Inc.
+  echo "Copyright (C) $year Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
   echo "Written by" "Bruno Haible" "and" "Simon Josefsson"
 }
 
+# func_emit_copyright_notice
+# outputs to stdout a header for a generated file.
+func_emit_copyright_notice ()
+{
+  echo "# Copyright (C) 2004-2006 Free Software Foundation, Inc."
+  echo "#"
+  echo "# This file is free software, distributed under the terms of the GNU"
+  echo "# General Public License.  As a special exception to the GNU General"
+  echo "# Public License, this file may be distributed as part of a program"
+  echo "# that contains a configuration script generated by Autoconf, under"
+  echo "# the same distribution terms as the rest of that program."
+  echo "#"
+  echo "# Generated by gnulib-tool."
+}
+
 # func_tmpdir
 # creates a temporary directory.
 # Sets variable
@@ -716,15 +732,7 @@
     perhapsLT=
   fi
   echo "## Process this file with automake to produce Makefile.in."
-  echo "# Copyright (C) 2004 Free Software Foundation, Inc."
-  echo "#"
-  echo "# This file is free software, distributed under the terms of the GNU"
-  echo "# General Public License.  As a special exception to the GNU General"
-  echo "# Public License, this file may be distributed as part of a program"
-  echo "# that contains a configuration script generated by Automake, under"
-  echo "# the same distribution terms as the rest of that program."
-  echo "#"
-  echo "# Generated by gnulib-tool."
+  func_emit_copyright_notice
   if test -n "$actioncmd"; then
     echo "# Reproduce by: $actioncmd"
   fi
@@ -790,15 +798,7 @@
   fi
   testsbase_inverse=`echo "$testsbase" | sed -e 's,/$,,' | sed -e 's,[^/][^/]*,..,g'`
   echo "## Process this file with automake to produce Makefile.in."
-  echo "# Copyright (C) 2004-2005 Free Software Foundation, Inc."
-  echo "#"
-  echo "# This file is free software, distributed under the terms of the GNU"
-  echo "# General Public License.  As a special exception to the GNU General"
-  echo "# Public License, this file may be distributed as part of a program"
-  echo "# that contains a configuration script generated by Automake, under"
-  echo "# the same distribution terms as the rest of that program."
-  echo "#"
-  echo "# Generated by gnulib-tool."
+  func_emit_copyright_notice
   echo
   # Generate dependencies here, since it eases the debugging of test failures.
   echo "AUTOMAKE_OPTIONS = 1.5 foreign"
@@ -1248,14 +1248,7 @@
   # Create m4/gnulib-cache.m4.
   func_dest_tmpfilename $m4base/gnulib-cache.m4
   (
-    echo "# Copyright (C) 2004 Free Software Foundation, Inc."
-    echo "# This file is free software, distributed under the terms of the GNU"
-    echo "# General Public License.  As a special exception to the GNU General"
-    echo "# Public License, this file may be distributed as part of a program"
-    echo "# that contains a configuration script generated by Autoconf, under"
-    echo "# the same distribution terms as the rest of that program."
-    echo "#"
-    echo "# Generated by gnulib-tool."
+    func_emit_copyright_notice
     echo "#"
     echo "# This file represents the specification of how gnulib-tool is used."
     echo "# It acts as a cache: It is written and read by gnulib-tool."
@@ -1309,14 +1302,7 @@
   # Create m4/gnulib-comp.m4.
   func_dest_tmpfilename $m4base/gnulib-comp.m4
   (
-    echo "# Copyright (C) 2004 Free Software Foundation, Inc."
-    echo "# This file is free software, distributed under the terms of the GNU"
-    echo "# General Public License.  As a special exception to the GNU General"
-    echo "# Public License, this file may be distributed as part of a program"
-    echo "# that contains a configuration script generated by Autoconf, under"
-    echo "# the same distribution terms as the rest of that program."
-    echo "#"
-    echo "# Generated by gnulib-tool."
+    func_emit_copyright_notice
     echo "#"
     echo "# This file represents the compiled summary of the specification in"
     echo "# gnulib-cache.m4. It lists the computed macro invocations that need"