changeset 10602:2857db90cf99

GNUmakefile: add 'make version' target * top/GNUmakefile (_curr-ver): Split version update rules... (version): ...into a target. Signed-off-by: Eric Blake <ebb9@byu.net>
author Eric Blake <ebb9@byu.net>
date Wed, 08 Oct 2008 08:46:29 -0600
parents ca053fa79cd3
children 1615784f409b
files ChangeLog top/GNUmakefile
diffstat 2 files changed, 15 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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.
@@ -116,7 +122,7 @@
 	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>.
@@ -298,7 +304,7 @@
 	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.
--- a/top/GNUmakefile
+++ b/top/GNUmakefile
@@ -71,17 +71,21 @@
           # 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