bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] Generalize GNUmakefile, ...


From: Eric Blake
Subject: Re: [PATCH] Generalize GNUmakefile, ...
Date: Thu, 20 Mar 2008 15:25:44 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Simon Josefsson <simon <at> josefsson.org> writes:

> > ./$(_build-aux)/git-version-gen

Oops - this isn't VPATH friendly.  I'm installing the following.

> > combine the two conditions into one test?
> >
> > ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL))
> 
> Clever.

That's what I get for being m4 maintainer - this trick works for any language 
that works by textual comparison of concatenated strings (both m4 and make fall 
in this category).

From: Eric Blake <address@hidden>
Date: Thu, 20 Mar 2008 09:24:13 -0600
Subject: [PATCH] VPATH fix.

* build-aux/GNUmakefile (_have_git-version-gen): Look in correct dir.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog             |    5 +++++
 build-aux/GNUmakefile |    7 +++----
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 490b40e..4d31c2a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-20  Eric Blake  <address@hidden>
+
+       VPATH fix.
+       * build-aux/GNUmakefile (_have_git-version-gen): Look in correct dir.
+
 2008-03-20  Simon Josefsson  <address@hidden>
 
        * build-aux/GNUmakefile: Make git-version-gen optional.  Add
diff --git a/build-aux/GNUmakefile b/build-aux/GNUmakefile
index a9d6196..d30f13b 100644
--- a/build-aux/GNUmakefile
+++ b/build-aux/GNUmakefile
@@ -40,18 +40,17 @@ export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
 
 include Makefile
 
-# Allow cfg.mk to override this.
-_build-aux ?= build-aux
-
 # Some projects override e.g., _autoreconf here.
 -include $(srcdir)/cfg.mk
 include $(srcdir)/maint.mk
 
+# Allow cfg.mk to override these.
+_build-aux ?= build-aux
 _autoreconf ?= autoreconf
 
 # Ensure that $(VERSION) is up to date for dist-related targets, but not
 # for others: rerunning autoreconf and recompiling everything isn't cheap.
-_have-git-version-gen := $(shell test -f ./$(_build-aux)/git-version-gen && 
echo yes)
+_have-git-version-gen := $(shell test -f $(srcdir)/$(_build-aux)/git-version-
gen && echo yes)
 ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL))
   _is-dist-target = $(filter-out %clean, \
     $(filter dist% alpha beta major,$(MAKECMDGOALS)))
-- 
1.5.4








reply via email to

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