bug-gnulib
[Top][All Lists]
Advanced

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

Re: GNUmakefile: git-version-gen, maintainer-check, install


From: Eric Blake
Subject: Re: GNUmakefile: git-version-gen, maintainer-check, install
Date: Wed, 8 Oct 2008 15:03:23 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de> writes:

> * Eric Blake wrote on Wed, Aug 27, 2008 at 04:38:00PM CEST:

[Revisiting an older thread]

> > > > Well, I tried to make it a hard error, so that it would be the only
> > > > output, but others on the list convinced me to reduce it back to a
> > > > warning.  I don't know of any GNU make construct to make it appear last.
> > 
> > What does everyone think of this patch?
> 
> Pause is not good.  It doesn't scale with system speed, it doesn't
> parallelize, who looks at build logs interactively anyway, except
> to get annoyed by the fact that it's still not done yet?

We still need some engineering efforts into the autotools to make handling an 
out-of-config.h version string easier to manage.  And I still don't know how to 
coerce GNU make into spitting out warnings last, instead of first.  But until 
autotool version management is improved, I'm at least committing this subset of 
the original proposal.  It leaves out the controversial pause (sorry, Joel; the 
one feature that you actually requested at the start of this thread is still 
unimplemented), but does add 'make version' as a nicer way to allow updating 
just the version with no other side-effects (I'm tired of having to do tricks 
like 'make dist' when all I want to do is propogate a version change throughout 
the development tree prior to a 'make install' of a package still in 
development).

Also, there has been a thread on the automake list recently about the issue of 
not touching config.h when changing the version.

From: Eric Blake <address@hidden>
Date: Wed, 8 Oct 2008 08:46:29 -0600
Subject: [PATCH] GNUmakefile: add 'make version' target

* top/GNUmakefile (_curr-ver): Split version update rules...
(version): ...into a target.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog       |   10 ++++++++--
 top/GNUmakefile |   10 +++++++---
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 931b308..744cd1b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-08  Eric Blake  <address@hidden>
+
+       GNUmakefile: add 'make version' target
+       * top/GNUmakefile (_curr-ver): Split version update rules...
+       (version): ...into a target.
+
 2008-10-07  Bruno Haible  <address@hidden>
 
        Use a more portable replacement expression for -0.0L.
diff --git a/top/GNUmakefile b/top/GNUmakefile
index 4b4cf15..7816416 100644
--- a/top/GNUmakefile
+++ b/top/GNUmakefile
@@ -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
-- 
1.6.0.2








reply via email to

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