Re: [Re: Shared library with source in sub directories]

2000-07-16 Thread Tom Tromey

Murray> 1) This doesn't work recursively. For instance, if sub
Murray> contains, subsub, which contains subsusbsub, then the library
Murray> at sub will contain subsub but not subsubsub. Therefore you
Murray> have to LIBADD all the libraries in the top makefile.

This is suprising.  I thought this was one of the benefits of libtool
-- portable library dependencies.

Murray> 2) noinst libraries with the same names in different
Murray> directories will conflict, leading to multiple definitions of
Murray> one of them. So you should probably name each noinst library
Murray> according to its complete path. e.g.
Murray> libsub_subsub_subsubsub.la.

This is also suprising to me.  I assume this is a libtool bug?  Could
you report it to the libtool maintainers?

Murray> Is there any news on a timeline for the prophesied version of
Murray> automake that properly handles sources in sub directories?

Nope.

Tom




Re: [Re: Shared library with source in sub directories]

2000-07-16 Thread Murray Cumming


Murray Cumming wrote:

>> I'm trying to use automake/autoconf to build a shared library whose source
>> code is neatly organised sub directories (about 5 levels wide and 5 levels
>> deep).
>>
>> If this was an application then I would build static libraries in each of
the
>> subfolders and link them all together at the top. But when I do something
like
>> this:
>>
>> libfoo_la_LDADD = exceptions/libexceptions.la factories/libfactories.la
>
> libtool complains that the .la libraries are not libtool objects. I could
>> build libtool libraries in the sub directories instead of static
libraries,
?> but then I'd have to install each of those temporary libraries. That would
be
>> stupid.
>>
>> So, how should I use automake to build a shared library if the source is
in
>> sub directories?

Paul Berrevoets <[EMAIL PROTECTED]> wrote:

> You create what are called 'convenience' libraries in libtool.

> In exceptions/Makefile.am:
> noinst_LTLIBRARIES = libexceptions.la
> ...

> Convenience libraries are not installed, and the object they contain will
be
> included in the higher level ltlibrary that LDADD's them.

I've got that working now. But here's a couple of important details for the
record:
1) This doesn't work recursively. For instance, if sub contains, subsub, which
contains subsusbsub, then the library at sub will contain subsub but not
subsubsub. Therefore you have to LIBADD all the libraries in the top
makefile.
2) noinst libraries with the same names in different directories will
conflict, leading to multiple definitions of one of them. So you should
probably name each noinst library according to its complete path. e.g.
libsub_subsub_subsubsub.la.

Is there any news on a timeline for the prophesied version of automake that
properly handles sources in sub directories?

Murray Cumming
[EMAIL PROTECTED]
www.murrayc.com
+44 7971 226563


Get free email and a permanent address at http://www.netaddress.com/?N=1




Re: newbie: samples

2000-07-16 Thread Tom Tromey

Jerome> Where can we get a large variety of `Makefile.am' scripts ?

Download a lot of GNU packages.

Tom




newbie: samples

2000-07-16 Thread Jerome Benoit

Hi !

Where can we get a large variety of `Makefile.am' scripts ?

Thanks in advance,
Jerome BENOIT