maint: consistently honor the UPDATE_COPYRIGHT_YEAR environment variable
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 12 Jan 2013 10:16:44 +0000 (11:16 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 12 Jan 2013 10:16:44 +0000 (11:16 +0100)
* maintainer/maint.mk (update-copyright): Here.  The 'lib/update-copyright'
already honoured it, but some parts of our recipe didn't.  This has caused
the incomplete copyright bump that was fixed by the previous patch.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
maintainer/maint.mk

index 69b1630..87df79f 100644 (file)
@@ -449,11 +449,17 @@ files_without_copyright += lib/mkinstalldirs
 # This script has an MIT-style license
 files_without_copyright += lib/install-sh
 
+# The UPDATE_COPYRIGHT_YEAR environment variable is honoured by the
+# 'lib/update-copyright' script.
 .PHONY: update-copyright
 update-copyright:
        $(AM_V_GEN)set -e; \
-       current_year=`date +%Y` && test -n "$$current_year" \
-         || { echo "$@: cannot get current year" >&2; exit 1; }; \
+       if test -n "$$UPDATE_COPYRIGHT_YEAR"; then \
+          current_year=$$UPDATE_COPYRIGHT_YEAR; \
+       else \
+         current_year=`date +%Y` && test -n "$$current_year" \
+           || { echo "$@: cannot get current year" >&2; exit 1; }; \
+       fi; \
        sed -i "/^RELEASE_YEAR=/s/=.*$$/=$$current_year/" \
          bootstrap.sh configure.ac; \
        excluded_re=`( \