diff options
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | aclocal.in | 4 | ||||
-rw-r--r-- | automake.in | 4 | ||||
-rwxr-xr-x | bootstrap | 3 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | lib/Automake/Config.in | 5 |
6 files changed, 20 insertions, 7 deletions
diff --git a/Makefile.am b/Makefile.am index 0d02de7b1..27b3fa022 100644 --- a/Makefile.am +++ b/Makefile.am @@ -860,7 +860,11 @@ update_copyright_env = \ .PHONY: update-copyright update-copyright: - $(AM_V_GEN)excluded_re=`echo $(FETCHFILES) \ + $(AM_V_GEN)set -e; \ + current_year=`date +%Y` && test -n "$$current_year" \ + || { echo "$@: cannot get current year" >&1; exit 1; }; \ + sed -i "/^RELEASE_YEAR=/s/=.*$$/=$$current_year/" configure.ac; \ + excluded_re=`echo $(FETCHFILES) \ | sed -e 's|^|lib/|' -e 's| | lib/|g' -e 's, ,|,g'`; \ $(GIT) ls-files \ | grep -Ev '^(lib/)?(COPYING|INSTALL)$$' \ diff --git a/aclocal.in b/aclocal.in index 1c58fb546..09e1da428 100644 --- a/aclocal.in +++ b/aclocal.in @@ -840,7 +840,7 @@ $output"; # name in the header. $output = "# generated automatically by aclocal $VERSION -*- Autoconf -*- -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-$RELEASE_YEAR Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -935,7 +935,7 @@ sub version() { print <<EOF; aclocal (GNU $PACKAGE) $VERSION -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) $RELEASE_YEAR Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. diff --git a/automake.in b/automake.in index 544f89399..a45410998 100644 --- a/automake.in +++ b/automake.in @@ -252,7 +252,7 @@ my %standard_prefix = # Copyright on generated Makefile.ins. my $gen_copyright = "\ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-$RELEASE_YEAR Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -8314,7 +8314,7 @@ sub version () { print <<EOF; automake (GNU $PACKAGE) $VERSION -Copyright (C) 2012 Free Software Foundation, Inc. +Copyright (C) $RELEASE_YEAR Free Software Foundation, Inc. License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. @@ -77,6 +77,8 @@ dosubst () { rm -f $2 in=`echo $1 | sed 's,^.*/,,'` + current_year=`date +%Y` && test -n "$current_year" \ + || { echo "$me: cannot get current year" >&2; exit 1; } sed -e "s%@APIVERSION@%$APIVERSION%g" \ -e "s%@PACKAGE@%$PACKAGE%g" \ -e "s%@PERL@%$PERL%g" \ @@ -84,6 +86,7 @@ dosubst () -e "s%@SHELL@%$BOOTSTRAP_SHELL%g" \ -e "s%@VERSION@%$VERSION%g" \ -e "s%@datadir@%$datadir%g" \ + -e "s%@RELEASE_YEAR@%$current_year%g" \ -e "s%@configure_input@%Generated from $in; do not edit by hand.%g" \ $1 > $2 chmod a-w $2 diff --git a/configure.ac b/configure.ac index 22a158f69..2829fd4de 100644 --- a/configure.ac +++ b/configure.ac @@ -42,6 +42,11 @@ dnl the automake options to avoid bloating and potential problems. AM_INIT_AUTOMAKE([dist-xz filename-length-max=99 color-tests parallel-tests silent-rules no-define no-dependencies]) +## Keep this on a line of its own, since it must be found and processed +## by the 'update-copyright' rule in out Makefile. +RELEASE_YEAR=2012 +AC_SUBST([RELEASE_YEAR]) + # The API version is the base version. We must guarantee # compatibility for all releases with the same API version. # Our current rule is that: diff --git a/lib/Automake/Config.in b/lib/Automake/Config.in index 24c979c34..bbf55ac05 100644 --- a/lib/Automake/Config.in +++ b/lib/Automake/Config.in @@ -22,8 +22,8 @@ use 5.006; require Exporter; our @ISA = qw (Exporter); -our @EXPORT = qw ($APIVERSION $PACKAGE $PACKAGE_BUGREPORT $VERSION $libdir - $perl_threads); +our @EXPORT = qw ($APIVERSION $PACKAGE $PACKAGE_BUGREPORT $VERSION + $RELEASE_YEAR $libdir $perl_threads); # Parameters set by configure. Not to be changed. NOTE: assign # VERSION as string so that e.g. version 0.30 will print correctly. @@ -31,6 +31,7 @@ our $APIVERSION = '@APIVERSION@'; our $PACKAGE = '@PACKAGE@'; our $PACKAGE_BUGREPORT = '@PACKAGE_BUGREPORT@'; our $VERSION = '@VERSION@'; +our $RELEASE_YEAR = '@RELEASE_YEAR@'; our $libdir = '@datadir@/@PACKAGE@-@APIVERSION@'; our $perl_threads = @PERL_THREADS@; |