Hello Roumen,
* Roumen Petrov wrote on Sun, Jul 01, 2007 at 09:30:51PM CEST:
Ralf Wildenhues wrote:
noinst_PROGRAMS = target
target_SOURCES = main.c
if WITH_CASE1
target_SOURCES += case1.c
endif
if WITH_CASE2
target_SOURCES += case2.c
endif
--- snip ---
With the above, there is no need to set target_LDADD or
target_DEPENDENCIES.
Its seems to me that automake 1.9.6 textinfo page "Conditional Sources"
is obsolete. Since page in CVS is same, please update textinfo.
I assume you're speaking about this (for version 1.10):
<http://sources.redhat.com/automake/automake.html#Conditional-Sources>
Well, details matter here. If you list sources explicitly but
conditionally in Makefile.am, then automake is smart enough to infer the
dependencies. If OTOH you assign them to a variable in configure.ac,
there is no way for automake to find out. In that latter case you do
need to set *_DEPENDENCIES.
Hope that helps.
Cheers,
Ralf