bug-gnulib
[Top][All Lists]
Advanced

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

Re: gnulib-tool: indicating the presence of gnulib modules


From: Bruno Haible
Subject: Re: gnulib-tool: indicating the presence of gnulib modules
Date: Thu, 4 Jan 2007 15:29:21 +0100

Eric Blake writes:
> > In the presence of multiple gnulib-tool invocations from the same directory
> > with the same configure.ac file, such macros may indicate the wrong thing
> > (because if you build libgnuA.a and libgnuB.a, the module may be compiled
> > into libgnuA but not into libgnuB). But I think that judicious use of
> > library dependencies can avoid most of the problems; and as a last resort,
> > the remaining problems can be solved by splitting the configure.ac file.
>
> What about reusing gnulib-tool --macro-prefix, then using sed to convert
> GNULIB_ into the correct prefix while copying files into place?

It's more than a simple substitution: Suppose libgnuA contains module M,
and libgnuB doesn't contain M but depends on libgnuA. Then, the macro
GNULIB_M should be replaced by something that evaluates to true always.
But when libgnuB doesn't depend on libgnuA, the macro GNULIB_M should
evaluate to false in the context of libgnuB. I.e. when you create the
sources of libgnuB you need to know the complete set of gnulib modules
of all libraries that this library depends on. This is a bit complicated.

> Is it
> worth this level of separation to allow cleaner use of competing gnulib
> libraries in the same config.h?

I'd prefer to keep things simple, until someone really has a problem with this.

Bruno


reply via email to

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