automake
[Top][All Lists]
Advanced

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

Re: RFC: Building a Shared Library (take 2)


From: Alexandre Duret-Lutz
Subject: Re: RFC: Building a Shared Library (take 2)
Date: Thu, 31 Jul 2003 00:38:17 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

>>> "Norman" == Norman Gray <address@hidden> writes:

 Norman> Alexandre, greetings,

 Norman> On Wednesday, July 30, 2003, at 06:40 PM, Alexandre Duret-Lutz wrote:

 >> Here is a second version of this section, so that we have

 Norman> This looks great -- it's very clear indeed.  As an ignorant user, I'm
 Norman> much more confident that I know what's going on.  I have a few
 Norman> comments.

 Norman> -------

 >> Libtool abstracts shared and static libraries into a unified concept
 >> henceforth called "libtool libraries".  Libtool libraries are files
 >> using the `.la' suffix, and can designate a static library, a shared
 >> [...]
 >> the `.lo' suffix.  Libtool libraries are built from these libtool
 >> objects.

 Norman> [I would add, here:]

 Norman> You don't need to know anything about the structure of `.la' or `.lo'
 Norman> files (and they are subject to change), but it is these files that
 Norman> libtool and automake use to coordinate the dependencies in a package,
 Norman> and it is these which you should use to express those dependencies.
 Norman> In other words, the existence of the libtool libraries and objects is
 Norman> part of the automake API; the content is not.

Hmmm, I'd rather not mention the API outside its section, or
we'll end up doing it everywhere.  Everything which is
documented is in the API.

How about this

   You should not assume anything about the structure of `.la' or `.lo'
files and how libtool constructs them: this is libtool's concern, and
the last thing one wants is to learn about libtool's guts.  However the
existence of these files matters, because they are used as targets and
dependencies in `Makefile's when building libtool libraries.  There are
situations where you may have to interact with these, for instance when
setting dependencies for building source files conditionally (*note
Conditional Libtool Sources::).

[...]

 Norman> Also, note that if you include the declarations for building a shared
 Norman> library, automake will automatically build the corresponding static
 Norman> library [this is true, isn't it?]  

Honestly I don't know.  Perhaps it's true, I guess it is, but
even tho I wouldn't assume that if libfoo.la exists then
libfoo.a exists.  Since I've requested libfoo.la, I shall only
use libfoo.la.  Static linking against libfoo.la can be forced
using libtool's -static or -all-static options.

[...]


 Norman> ...in some `_LTLIBRARIES' variable, such as `lib_LTLIBRARIES'.

Would the work "installable" help?

This is the case for libraries listed explicitly in
some installable `_LTLIBRARIES' variables such as `lib_LTLIBRARIES'.

[...]

 Norman> [?add]

 Norman> Recall that you will typically not assign to either `LIBOBJS' or
 Norman> `LTLIBOBJS', either in `automake' or `configure'; your only contact
 Norman> with it is to declare which library depends on these missing
 Norman> functions. [or am I still confused, sigh?]

I guess LIBOBJS really needs its own section, but one chore a
week is enough :)
-- 
Alexandre Duret-Lutz





reply via email to

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