[Top][All Lists]

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

Re: [automake] Dependency question with _LDADD

From: Ralf Wildenhues
Subject: Re: [automake] Dependency question with _LDADD
Date: Tue, 19 Aug 2008 21:43:07 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Michel,

* Michel Briand wrote on Tue, Aug 19, 2008 at 05:03:29PM CEST:
> Referring to GNU Automake manual ยง8.1.2, I'm using the <myprog>_LDADD
> variable in my to link it with my library built in the same
> package (but in a different directory).
> But every time I rebuild the library (without having changed any .h) the
> program is relinked.

Which is as it should be: the program depends upon the library.

Are you referring to a static or shared library BTW?  With static
libraries, it is pretty easy to see why the program needs updating:
the code of the archive ends up in the program.  With shared libraries,
it is not strictly necessary to relink the program if the library has
undergone only backward-compatible changes.  But automake cannot know
that, so the safe thing to do is to relink.  Besides, even with
compatible changes you want your program to pick up new versioned
symbols (if used) and the like.

> I'd like to have a that will not generated relinking of my
> program once it has been linked one time.


You can probably achieve what you desire by setting
<myprog>_DEPENDENCIES manually.  Look in the current for how
automake sets it, and put an adjusted setting in

Hope that helps.


reply via email to

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