bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] gnumakefile: don't squelch _version output


From: Eric Blake
Subject: [PATCH] gnumakefile: don't squelch _version output
Date: Tue, 30 Mar 2010 17:40:50 -0600

Borrowing from a trick I discovered on the libvirt list.

* top/GNUmakefile (GNUmakefile): Create one-shot dependency rather
than using $(shell) to run _version target.
(_autoreconf): Run verbosely, by default.

Signed-off-by: Eric Blake <address@hidden>
---

This was quite tricky to implement.  I've tested (with m4) that this
runs autoreconf at most once, and only when the version string is
out-of-date.  The _version target has to make sure Makefile is
up-to-date (otherwise, autoreconf is run twice), and at least one
makefile has to change timestamps (or GNU make won't reload the new
value of $(VERSION) and will proceed with invalid version strings).

But the end result is that you now see more progress during an
autoreconf run that is updataing an intra-release version number.

I'll wait for a day or two, or a positive review (whichever comes
first) before pushing it.

 ChangeLog       |    7 +++++++
 top/GNUmakefile |    6 ++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a30f717..2996b19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2010-03-30  Eric Blake  <address@hidden>

+       gnumakefile: don't squelch _version output
+       * top/GNUmakefile (_version): Create one-shot dependency rather
+       than using $(shell) when version must be regenerated.
+       (_autoreconf): Run verbosely, by default.
+
+2010-03-30  Eric Blake  <address@hidden>
+
        maint: improve module indicators
        * m4/gnulib-common.m4 (gl_MODULE_INDICATOR_SET_VARIABLE)
        (gl_MODULE_INDICATOR, gl_MODULE_INDICATOR_FOR_TESTS): Fit in 80
diff --git a/top/GNUmakefile b/top/GNUmakefile
index 40ccc06..daba47a 100644
--- a/top/GNUmakefile
+++ b/top/GNUmakefile
@@ -49,7 +49,7 @@ include $(srcdir)/maint.mk

 # Allow cfg.mk to override these.
 _build-aux ?= build-aux
-_autoreconf ?= autoreconf
+_autoreconf ?= autoreconf -v

 # Ensure that $(VERSION) is up to date for dist-related targets, but not
 # for others: rerunning autoreconf and recompiling everything isn't cheap.
@@ -78,7 +78,8 @@ ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL))
           $(info run '$(MAKE) _version' to fix it)
         else
           $(info INFO: running autoreconf for new version string: $(_curr-ver))
-          _dummy := $(shell $(MAKE) $(AM_MAKEFLAGS) _version)
+GNUmakefile: _version
+       touch GNUmakefile
         endif
       endif
     endif
@@ -88,6 +89,7 @@ endif
 .PHONY: _version
 _version:
        cd $(srcdir) && rm -rf autom4te.cache .version && $(_autoreconf)
+       $(MAKE) $(AM_MAKEFLAGS) Makefile

 else

-- 
1.6.6.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]