Simon Josefsson <[EMAIL PROTECTED]> writes:
> Simon Josefsson <[EMAIL PROTECTED]> writes:
>
>> Eric Blake <[EMAIL PROTECTED]> writes:
>>
>>> According to Eric Blake on 3/20/2008 7:20 AM:
>>> | Here's stage 1 for the gnulib side - picking up useful tricks from
>>> | coreutils into gnulib's copy. I'd still like to consider splitting the
>>> | module, and implementing gnulib-tool hooks to recognize top/GNUmakefile in
>>> | a module description as a request to install the file in '.', regardless
>>> | of whether build-aux is '.' or a subdirectory.
>>>
>>> What do you think of applying this as stage 2?
>>
>> On second thought, can't we make git-version-gen optional? Not everyone
>> uses git. I still have some projects that use GNUmakefile but use CVS.
>
> In case I wasn't clear: I meant that git-version-gen should go into its
> own gnulib module. Projects that want it can import that module, and
> GNUmakefile would detect that it is present and use it. Projects that
> don't use git doesn't need to import that module, and the GNUmakefile
> would notice that the file isn't available, and won't do anything about
> git-versions.
A patch explains what I mean more clear. Skip your patch, and apply
this instead. There already was a git-version-gen module. What do you
think?
/Simon
diff --git a/build-aux/GNUmakefile b/build-aux/GNUmakefile
index fac11d3..e5eafbd 100644
--- a/build-aux/GNUmakefile
+++ b/build-aux/GNUmakefile
@@ -48,7 +48,9 @@ _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.
-ifeq (0,$(MAKELEVEL))
+_have-git-version-gen := $(shell test -f ./build-aux/git-version-gen && echo
yes)
+ifeq ($(_have-git-version-gen),yes)
+ ifeq (0,$(MAKELEVEL))
_is-dist-target = $(filter-out %clean, \
$(filter dist% alpha beta major,$(MAKECMDGOALS)))
ifneq (,$(_is-dist-target))
@@ -59,6 +61,7 @@ ifeq (0,$(MAKELEVEL))
_dummy := $(shell cd $(srcdir) && rm -rf autom4te.cache &&
$(_autoreconf)))
endif
endif
+ endif
endif
else