Generate also simple case mapping tables.
[gnulib.git] / top / GNUmakefile
index 7635e8d..0fdd3fa 100644 (file)
@@ -53,9 +53,9 @@ _autoreconf ?= autoreconf
 _have-git-version-gen := \
   $(shell test -f $(srcdir)/$(_build-aux)/git-version-gen && echo yes)
 ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL))
-  _is-dist-target = $(filter-out %clean, \
+  _is-dist-target ?= $(filter-out %clean, \
     $(filter maintainer-% dist% alpha beta major,$(MAKECMDGOALS)))
-  _is-install-target = $(filter-out %check, $(filter install%,$(MAKECMDGOALS)))
+  _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)
@@ -71,17 +71,21 @@ ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL))
           # 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)
+          $(info WARNING: version string $(VERSION) is out of date;)
+          $(info run '$(MAKE) _version' to fix it)
         else
           $(info INFO: running autoreconf for new version string: $(_curr-ver))
-          _dummy := $(shell cd $(srcdir) && rm -rf autom4te.cache .version \
-            && $(_autoreconf))
+          _dummy := $(shell $(MAKE) $(AM_MAKEFLAGS) _version)
         endif
       endif
     endif
   endif
 endif
 
+.PHONY: _version
+_version:
+       cd $(srcdir) && rm -rf autom4te.cache .version && $(_autoreconf)
+
 else
 
 .DEFAULT_GOAL := abort-due-to-no-makefile