[Top][All Lists]

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

Re: Automatic dependecy based compilation targets

From: Dizzy
Subject: Re: Automatic dependecy based compilation targets
Date: Fri, 2 Feb 2007 12:49:10 +0200
User-agent: KMail/1.9.5

On Thursday 01 February 2007 19:40, Ralf Wildenhues wrote:
> Hello Mihai,


> Quote <>:
> |    As a rule of thumb, link a libtool convenience library into at most
> | one libtool library, and never into a program, and link libtool static
> | convenience libraries only into programs, and only if you need to carry
> | library dependency information to the user of the static convenience
> | library.
> But be sure to read more than just that.  Get into the habit that
> convenience archives are just a shorthand for "this set of object files"
> whereas libraries are treated as entities whose contents nor whose name
> as dependency are not to be duplicated (in the common case).
> If you want your libfoo and libbar to not be convenience archives, but
> installable libraries, then for the EXTRA* stuff I think you need to put
> "-rpath $(libdir)" yourself in libfoo_la_LDFLAGS etc.

I don't want libfoo/libbar to be installable libraries, I want them to be 
convenience libraries that should be build only if at make time there is a 
dependency on them (thus they are EXTRA but I cannot use 
EXTRA_noinst_LTLIBRARIES because it says some error about some noinstdir 
variable not declared). And I also want to have installable libraries be made 
by incorporating code form libfoo/libbar convenience libraries. 

I just have some convenience libraries that have their own dependency 
relations expressed for them (with LIBADD), because some convenience 
libraries depend on other convenience libraries (so I want all convenience 
libraries to be able to be used independent if needed in an installable 
progral/library without having to list their dependencies in the installable 
progral/library LDADD/LIBADD list).

And then I want to link some installable executables (sbin_PROGRAMS) and 
installable libraries (lib_LTLIBRARIES) with a set of those convenience 
libraries (I know what dependency a final target like an installable 
executable/library has and I express those dependencies listing as 
LDADD/LIBADD the convenience libraries I know they directly need but 
sometimes those convenience libraries themselves had a dependency on some 
listed convenience libraries and this creates problems for lib_LTLIBRARIES 
when eventually it gets to link duplicate convenience libraries). Now what I 
noticed is that while there are no problems with linking duplicate 
convenience libraries into executables, there are problems (those multiple 
definitions linking errors) linking duplicate convenience libraries into an 
installable library.

Maybe I miss something obvious, thank you for your help

Mihai RUSU                                      Email: address@hidden
GPG :      WWW:
                        "Linux is obsolete" -- AST

reply via email to

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