[Top][All Lists]

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

Re: [automake] Dependency question with _LDADD

From: Michel Briand
Subject: Re: [automake] Dependency question with _LDADD
Date: Tue, 26 Aug 2008 17:09:34 +0200

Ralf Wildenhues <address@hidden> - Tue, 19 Aug 2008 21:43:07

>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.

Hello Ralf,

as an exercise I decided to learn the maximum about automake and
libtool, and write a complete example.

What do you think of my example ? Is it useful for other people
to learn autotools ?

autotraining.working.tar.gz is the minimal distribution of the package,
one will need autotools to generate the build system.

COPYING in autotraining.working.tar.gz says that all the files are by
default released under the GPL. But if it poses problem to someone I
can change this. 

I implemented library & program versioning. Basically.
I also modified the program's to not rebuild the program
when the library was just rebuilt.


: :' :  We are Lower your prices, surrender your code.
`. `'   We will add your hardware and software distinctiveness to
  `-    our own. Resistance is futile.


Attachment: autotraining.working.tar.gz
Description: GNU Zip compressed data

reply via email to

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