autoconf
[Top][All Lists]
Advanced

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

Re: Nested Packages: dependencies between autoconfiscated packages


From: Ralf Wildenhues
Subject: Re: Nested Packages: dependencies between autoconfiscated packages
Date: Mon, 18 Jul 2011 08:35:44 +0200

Hello Vítor,

* Vítor da Rosa wrote on Sun, Jul 10, 2011 at 03:45:17AM CEST:
> Suppose that instead of having arm and hand packages, my project
> application has body as main package and trunk, arm and leg as
> subpackages (autoconfiscated packages), such as the following
> directory hierarchy:
> 
> body
> |--> trunk
> |--> arm
> |--> leg
> 
> 
> The packages arm and leg call functions from trunk subpackage, so they
> have library and header dependencies on trunk. Here comes my question.

...
> # Include headers from arm, leg and trunk when compiling this directory.
> AM_CPPFLAGS = -I$(srcdir)/arm -I$(srcdir)/leg -I$(srcdir)/trunk
...
> # link with the arm, leg and trunk library.
> libbody_la_LIBLDADD = arm/libarm.la leg/libleg.la trunk/libtrunk.la

So you're saying you have dependencies going in both ways?  Why are you
making them separate packages then?  (Honest question, doing so can be
useful for reasons other than being able to split packages.)


In your arm and leg package, you cannot test for trunk libraries at
configure time (obviously, as they don't exist yet at that time).
So you typically hard-code them as $(top_srcdir)/../libbody.la or so,
likewise -I$(top_srcdir)/..  Of course this is invalid, as libbody
already depends on libarm and libleg, and a circular dependency would
not work.

Header dependencies are not a problem, but often, the structure can be
reformulated not to require such interdependencies.

Hope that helps.

Cheers,
Ralf



reply via email to

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