Ralf Wildenhues <[EMAIL PROTECTED]> - Tue, 19 Aug 2008 21:43:07 +0200
>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 Makfile.am 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 Makefile.am that will not generated relinking of my >> program once it has been linked one time. > >Why? > >You can probably achieve what you desire by setting ><myprog>_DEPENDENCIES manually. Look in the current Makefile.in for how >automake sets it, and put an adjusted setting in Makefile.am. > >Hope that helps. > >Cheers, >Ralf 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 Makefile.am to not rebuild the program when the library was just rebuilt. Cheers, Michel -- .''`. : :' : We are debian.org. Lower your prices, surrender your code. `. `' We will add your hardware and software distinctiveness to `- our own. Resistance is futile.
autotraining.working.tar.gz
Description: GNU Zip compressed data