summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2013-05-05 20:16:25 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2013-05-06 12:23:20 +0200
commitf8ac780d14229e99d70b46b50e3d026e2c93a6a3 (patch)
tree1c0db4f8810bc89f37c48a4bfde96809cb117009 /lib
parent3c5f3ba0691d524cc804aa187607b34fc312872c (diff)
downloadautoconf-f8ac780d14229e99d70b46b50e3d026e2c93a6a3.tar.gz
build: define RELEASE_YEAR with AC_SUBST
Rather than reading it dynamically from the ChangeLog -- that, remember, is only a dummy in a Git checkout! To avoid risking the definition to get out-of-sync, let's enhance the maintainer target 'update-copyright' to update it automatically (the same way it's done in the Automake build system). * configure.ac (RELEASE_YEAR): New AC_SUBST'd variable. * cfg.mk (update-release-year): New maintainer-specific target to automatically update the value of that variable. (update-copyright): Depend on the new target. * bin/local.mk (RELEASE_YEAR): Drop definition. (edit): Simplify quoting of $(RELEASE_YEAR). * lib/Makefile.am (RELEASE_YEAR): Drop definition. (m4sugar/version.m4): Simplify quoting of $(RELEASE_YEAR). Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile.am6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 1004622b..2b4c494d 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -162,10 +162,6 @@ nodist_m4sugarlib_DATA = \
CLEANFILES += $(nodist_m4sugarlib_DATA)
-# Get the release year from ../ChangeLog.
-RELEASE_YEAR = \
- `sed 's/^\([0-9][0-9][0-9][0-9]\).*/\1/;q' $(top_srcdir)/ChangeLog`
-
# The ':;' in the second line of the recipe works around a redirected
# compound command bash exit status bug.
m4sugar/version.m4: Makefile
@@ -182,7 +178,7 @@ m4sugar/version.m4: Makefile
echo 'm4_define([m4_PACKAGE_STRING], [$(PACKAGE_STRING)])' && \
echo 'm4_define([m4_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])' && \
echo 'm4_define([m4_PACKAGE_URL], [$(PACKAGE_URL)])' && \
- echo 'm4_define([m4_PACKAGE_YEAR], ['$(RELEASE_YEAR)'])'; \
+ echo 'm4_define([m4_PACKAGE_YEAR], [$(RELEASE_YEAR)])'; \
} > $@-t
mv $@-t $@