bug-automake
[Top][All Lists]
Advanced

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

Re: how to create dependencies for conditional sources


From: Roumen Petrov
Subject: Re: how to create dependencies for conditional sources
Date: Mon, 02 Jul 2007 00:29:33 +0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070306 SeaMonkey/1.0.8

Now I understand what is my failure.
First I mix configure substitutions and automake conditionals and second in my test case EXTRA_...SOURCES is missing.

Documentation is OK.

I will use conditionals since is more simple although is listed as second solution in Documentation.

Thanks,
Roumen


Ralf Wildenhues wrote:
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






reply via email to

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