]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Ensure that $(VERSION) is up to date for dist-related targets.
authorJim Meyering <jim@meyering.net>
Sun, 2 Sep 2007 09:37:57 +0000 (11:37 +0200)
committerJim Meyering <jim@meyering.net>
Sun, 2 Sep 2007 11:48:36 +0000 (13:48 +0200)
* GNUmakefile: Arrange to rerun autoconf, if the version reported
by git-version-gen doesn't match $(VERSION), but only for dist targets.

Signed-off-by: Jim Meyering <jim@meyering.net>
ChangeLog
GNUmakefile

index 2ee14dc6f8a2825ef5d3037bbcbd8ff941986f04..82498f955e84382654c65bd36a02af6230ff9c41 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2007-09-02  Jim Meyering  <jim@meyering.net>
 
+       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.
+
        bootstrap: uses rsync to download the .po files
        * bootstrap (po_download_command_format): New global.
        (download_po_files): Use rsync.
index eef4cb0735cec51b64c1c7ac4263b376a788ca1d..92f989c2bd2ac3f51d690156508c7e997910d97c 100644 (file)
@@ -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 0 .version)
+    ifneq ($(_curr-ver),$(VERSION))
+      $(info INFO: rerunning autoconf for new version string $(_curr-ver))
+      $(shell touch configure.ac)
+    endif
+  endif
+endif
+
 include $(srcdir)/Makefile.cfg
 include $(srcdir)/Makefile.maint