diff options
author | Jim Meyering <meyering@redhat.com> | 2007-10-22 19:54:52 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2007-10-28 15:29:01 +0100 |
commit | 441bb2a1c354b07da17ce0751fb9a41aa2cfdcbe (patch) | |
tree | 9b797f29db85e9187d4d6fcac9f4e0959f5a25c1 /GNUmakefile | |
parent | 0f345668724e79af9c89555a480c83ce7d7ed953 (diff) | |
download | autoconf-441bb2a1c354b07da17ce0751fb9a41aa2cfdcbe.tar.gz |
Make inter-release --version output more useful.
Now, each unofficial build has a version "number" like 2.61a-19-58dd,
which indicates that it is built using the 19th change set
(in _some_ repository) following the "v2.61a" tag, and that 58dd
is a prefix of the commit SHA1.
* build-aux/git-version-gen: New file.
* configure.ac: Run it to set the version.
(AM_INIT_AUTOMAKE): Don't check NEWS here.
* Makefile.am (dist-hook): Arrange so that .version appears only
in distribution tarballs, never in a checked-out repository.
* .gitignore: Add .version here, too. Just in case.
* tests/Makefile.am ($(srcdir)/package.m4): Depend on Makefile,
not configure.ac, now that the version number changes automatically.
Ensure that $(VERSION) is up to date for dist-related targets.
* GNUmakefile: Arrange to rerun autoconf, if the version reported by
git-version-gen doesn't match $(VERSION), but only for dist targets.
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile index 7a1b0d2b..30fdcc42 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -39,6 +39,20 @@ ifeq ($(have-Makefile),yes) export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner include Makefile + +# Ensure that $(VERSION) is up to date for dist-related targets, but not +# for others: rerunning autoconf and recompiling everything isn't cheap. +ifeq (0,$(MAKELEVEL)) + _is-dist-target = $(filter dist% alpha beta major,$(MAKECMDGOALS)) + ifneq (,$(_is-dist-target)) + _curr-ver := $(shell build-aux/git-version-gen .version) + ifneq ($(_curr-ver),$(VERSION)) + $(info INFO: rerunning autoconf for new version string: $(_curr-ver)) + dummy := $(shell rm -rf autom4te.cache; $(AUTOCONF)) + endif + endif +endif + include $(srcdir)/Makefile.cfg include $(srcdir)/Makefile.maint |