On Wed, Dec 30, 2009 at 21:37, Ralf Wildenhues <ralf.wildenh...@gmx.de> wrote:
Ralf > The rules generated by Automake may or may not need to use the -c and -o > options at the same time. This depends upon a few internal details: > whether the subdir-objects option is used, whether objects need to be > renamed due to per-target compile flags, etc. I'm not using any of these. > Even in packages where the `compile' script is not deemed necessary, the > rules might use '-c -o' if configure determined that GCC is used; that > compiler is always assumed to allow this option combination. Thanks for the explanation > I cannot see anything in the Makefile.am that would need -c -o. > > Note that for library dependencies that apply to all programs in a > makefile you can use the "global" LDADD variable, which may allow you to > remove most if not all of those per-target *_LDADD settings. That's something I've been meaning to do for a while, but there have been more pressing matters to attend to. > Note further that the default set of sources for a program foo is foo.c > (and Automake 1.11+ allows you to change the default source file > extension to, say, .cpp, too), so you don't need to explicitly set most > of those *_SOURCES variables either. Good point, thanks that'll make it much simpler. >> PS: I simple solution would be to just put an appropriate version of >> the compile script in the gnuscripts but I would like to understand >> why it is needed in this case, and not in others. > > Sure. Hope this helps. Thanks for the help. I'll make those simplifications. Cheers Adam