diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-05-05 20:16:25 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2013-05-06 12:23:20 +0200 |
commit | f8ac780d14229e99d70b46b50e3d026e2c93a6a3 (patch) | |
tree | 1c0db4f8810bc89f37c48a4bfde96809cb117009 /bin/local.mk | |
parent | 3c5f3ba0691d524cc804aa187607b34fc312872c (diff) | |
download | autoconf-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 'bin/local.mk')
-rw-r--r-- | bin/local.mk | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/bin/local.mk b/bin/local.mk index 57983f82..ff7b2cfd 100644 --- a/bin/local.mk +++ b/bin/local.mk @@ -38,10 +38,6 @@ EXTRA_DIST += \ # Files that should be removed, but which Automake does not know. MOSTLYCLEANFILES += $(bin_SCRIPTS) bin/autoconf.in bin/*.tmp -# Get the release year from ChangeLog. -RELEASE_YEAR = \ - `sed 's/^\([0-9][0-9][0-9][0-9]\).*/\1/;q' $(top_srcdir)/ChangeLog` - ## ------------- ## ## The scripts. ## ## ------------- ## @@ -60,7 +56,7 @@ edit = sed \ -e 's|@M4_DEBUGFILE[@]|$(M4_DEBUGFILE)|g' \ -e 's|@M4_GNU[@]|$(M4_GNU)|g' \ -e 's|@AWK[@]|$(AWK)|g' \ - -e 's|@RELEASE_YEAR[@]|'$(RELEASE_YEAR)'|g' \ + -e 's|@RELEASE_YEAR[@]|$(RELEASE_YEAR)|g' \ -e 's|@VERSION[@]|$(VERSION)|g' \ -e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \ -e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g' |