53
53
_have-git-version-gen := \
54
54
$(shell test -f $(srcdir)/$(_build-aux)/git-version-gen && echo yes)
55
55
ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL))
56
_is-dist-target = $(filter-out %clean, \
56
_is-dist-target ?= $(filter-out %clean, \
57
57
$(filter maintainer-% dist% alpha beta major,$(MAKECMDGOALS)))
58
ifneq (,$(_is-dist-target))
59
_curr-ver := $(shell cd $(srcdir) && ./$(_build-aux)/git-version-gen \
60
$(srcdir)/.tarball-version)
58
_is-install-target ?= $(filter-out %check, $(filter install%,$(MAKECMDGOALS)))
59
ifneq (,$(_is-dist-target)$(_is-install-target))
60
_curr-ver := $(shell cd $(srcdir) \
61
&& $(_build-aux)/git-version-gen .tarball-version)
61
62
ifneq ($(_curr-ver),$(VERSION))
62
63
ifeq ($(_curr-ver),UNKNOWN)
63
64
$(info WARNING: unable to verify if $(VERSION) is correct version)
65
$(info INFO: running autoreconf for new version string: $(_curr-ver))
66
_dummy := $(shell cd $(srcdir) && rm -rf autom4te.cache .version \
66
ifneq (,$(_is-install-target))
67
# GNU Coding Standards state that 'make install' should not cause
68
# recompilation after 'make all'. But as long as changing the version
69
# string alters config.h, the cost of having 'make all' always have an
70
# up-to-date version is prohibitive. So, as a compromise, we merely
71
# warn when installing a version string that is out of date; the user
72
# should run 'autoreconf' (or something like 'make distcheck') to
73
# fix the version, 'make all' to propagate it, then 'make install'.
74
$(info WARNING: version string $(VERSION) is out of date; run autoreconf -f to fix it)
76
$(info INFO: running autoreconf for new version string: $(_curr-ver))
77
_dummy := $(shell cd $(srcdir) && rm -rf autom4te.cache .version \