bug-gnulib
[Top][All Lists]
Advanced

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

Re: multiple invocations of gnulib-tool


From: Bruno Haible
Subject: Re: multiple invocations of gnulib-tool
Date: Wed, 29 Oct 2008 01:27:04 +0100
User-agent: KMail/1.5.4

Simon Josefsson wrote:
> The problem is gone, but if anyone is interested, the reason the problem
> occurred was that gnutls has several gnulib directories, one for LGPL
> files that can be used by the library, and other gnulib directories for
> GPL stuff.  The string.h module is added in the LGPL directory.  The
> strerror module is added in the GPL directory.  So the strerror
> re-declaration is visible even for the gnutls library that include
> string.h.

Additionally, the package has only a single 'configure' and a single 'config.h'
file. This has the effect that not only for sterror, but for all replacements
done by the GPL stuff,
  - All GNULIB_FOO module indicators set for use by the GPL stuff will also
    have the value 1 when used in the LGPL stuff,
  - All "#define foo rpl_foo" done in config.h, as well as those done in
    generated header files like string.h, will also be active for the LGPL
    stuff, even if they refer to functions defined only in the GPL part.

This setup just won't work in the long run.(*) If you use multiple gnulib-tool
invocations, you also need multiple configure files.

Two setups that will work are:
  1) Completely separate directories for the two gnulib-tool invocations,
     Neither of the two will use the other directory.
  2) The GPLed directory can use the LGPLed directory through -I and -L
     options. But you have to ensure that the GPL'ed config.h starts out with
       #include "../lgl/config.h"
     to include the other config.h first. In this case you can use the --avoid
     option to drop redundant modules from the GPLed directory.

Bruno


(*) Look at the many uses of GNULIB_* macros in lib/*.c files. For example,
    clean-temp.c from the LGPLed directory may refer to close_stream from the
    GPLed directory when it sees that GNULIB_CLOSE_STREAM is defined to 1.





reply via email to

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