GNUmakefile: add 'make version' target
authorEric Blake <ebb9@byu.net>
Wed, 8 Oct 2008 14:46:29 +0000 (08:46 -0600)
committerEric Blake <ebb9@byu.net>
Wed, 8 Oct 2008 14:46:29 +0000 (08:46 -0600)
* top/GNUmakefile (_curr-ver): Split version update rules...
(version): ...into a target.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
top/GNUmakefile

index 931b308..744cd1b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-08  Eric Blake  <ebb9@byu.net>
+
+       GNUmakefile: add 'make version' target
+       * top/GNUmakefile (_curr-ver): Split version update rules...
+       (version): ...into a target.
+
 2008-10-07  Bruno Haible  <bruno@clisp.org>
 
        Use a more portable replacement expression for -0.0L.
        entire testsuite consistent and avoids an Irix 6.2 bug.
 
 2008-10-05  Bruno Haible  <bruno@clisp.org>
-            Jim Meyering  <jim@meyering.net>
+           Jim Meyering  <jim@meyering.net>
 
        Add an option for ignoring EPIPE during close_stdout.
        * lib/closeout.h: Include <stdbool.h>.
        Reported by Rainer Tammer <tammer@tammer.net>.
 
 2008-10-03  Paolo Bonzini  <bonzini@gnu.org>
-            Bruno Haible  <bruno@clisp.org>
+           Bruno Haible  <bruno@clisp.org>
 
        * lib/errno.in.h (EWOULDBLOCK) [win32]: Define to EAGAIN.
        * lib/winsock.c (set_winsock_errno): Map WSAEWOULDBLOCK to EWOULDBLOCK.
index 4b4cf15..7816416 100644 (file)
@@ -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