summaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-08-12 17:19:17 +0200
committerSimon Josefsson <simon@josefsson.org>2008-08-12 17:19:17 +0200
commit6a878fff62e1741a208892b4332b2a788179bd99 (patch)
tree71ebe199943dbc1a9b541c445d67e837c03b71f6 /GNUmakefile
parentb1d325534a0b8e9b830c9ccefd035a02652e7d25 (diff)
downloadlibtasn1-6a878fff62e1741a208892b4332b2a788179bd99.tar.gz
libtasn1-6a878fff62e1741a208892b4332b2a788179bd99.tar.bz2
libtasn1-6a878fff62e1741a208892b4332b2a788179bd99.zip
Update gnulib files.
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile28
1 files changed, 22 insertions, 6 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 0c1bc38..7635e8d 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -55,13 +55,29 @@ _have-git-version-gen := \
ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL))
_is-dist-target = $(filter-out %clean, \
$(filter maintainer-% dist% alpha beta major,$(MAKECMDGOALS)))
- ifneq (,$(_is-dist-target))
- _curr-ver := $(shell cd $(srcdir) && ./$(_build-aux)/git-version-gen \
- $(srcdir)/.tarball-version)
+ _is-install-target = $(filter-out %check, $(filter install%,$(MAKECMDGOALS)))
+ ifneq (,$(_is-dist-target)$(_is-install-target))
+ _curr-ver := $(shell cd $(srcdir) \
+ && $(_build-aux)/git-version-gen .tarball-version)
ifneq ($(_curr-ver),$(VERSION))
- $(info INFO: running autoreconf for new version string: $(_curr-ver))
- _dummy := $(shell cd $(srcdir) && rm -rf autom4te.cache .version \
- && $(_autoreconf))
+ ifeq ($(_curr-ver),UNKNOWN)
+ $(info WARNING: unable to verify if $(VERSION) is correct version)
+ else
+ ifneq (,$(_is-install-target))
+ # GNU Coding Standards state that 'make install' should not cause
+ # recompilation after 'make all'. But as long as changing the version
+ # string alters config.h, the cost of having 'make all' always have an
+ # up-to-date version is prohibitive. So, as a compromise, we merely
+ # warn when installing a version string that is out of date; the user
+ # should run 'autoreconf' (or something like 'make distcheck') to
+ # fix the version, 'make all' to propagate it, then 'make install'.
+ $(info WARNING: version string $(VERSION) is out of date; run autoreconf -f to fix it)
+ else
+ $(info INFO: running autoreconf for new version string: $(_curr-ver))
+ _dummy := $(shell cd $(srcdir) && rm -rf autom4te.cache .version \
+ && $(_autoreconf))
+ endif
+ endif
endif
endif
endif