automake
[Top][All Lists]
Advanced

[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: Thu, 1 Feb 2007 16:22:44 +0200
User-agent: KMail/1.9.5

On Wednesday 31 January 2007 19:38, Ralf Wildenhues wrote:
> * Dizzy wrote on Wed, Jan 31, 2007 at 12:44:39PM CET:
> Learn about EXTRA_noinst_LIBRARIES and other EXTRA_* thingies.

Thank you very much I have done most of what I wanted with EXTRA_LTLIBRARIES 
(there is no EXTRA_noinst_LIBRARIES). Now when a dependency shows up at make 
time the target is there to build it as I wished.

However I ran into another problem, I have something like:
EXTRA_LTLIBRARIES=libbar.la libfoo.la
libbar_la_SOURCES=Bar.hpp bar.cpp
libfoo_la_SOURCES=Foo.hpp Foo.cpp
# make foo depend on bar
libfoo_la_LIBADD=libbar.la

Now if I have
lib_LTLIBRARIES=libfinal.la
libfinal_la_SOURCES=many sources...
libfinal_la_LIBADD=libfoo.la libbar.la

I get multiple definitions errors at link time for libfinal.la and symbols in 
libbar.la. Now I can workarround this by "knowing" that libbar.la "provides" 
libfoo.la (as LIBADD) and I shouldn't list libfoo.la too in libfinal LIBADD. 
But I don't want this because it assumes one has to go through all the 
dependency tree (imagine many libfoo/libbar with a complex dependency tree) 
to resolve the dependencies. One should just know that libfinal directly 
needs libfoo and directly needs libbar (and if libbar also needs libfoo 
that's a detail that should be taken care of transparently somehow).

Any solution to this ?

Thanks!

-- 
Mihai RUSU                                      Email: address@hidden
GPG : http://dizzy.roedu.net/dizzy-gpg.txt      WWW: http://dizzy.roedu.net
                        "Linux is obsolete" -- AST




reply via email to

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