automake
[Top][All Lists]
Advanced

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

Re: Canonical way to conditionally add (a large amount of) sources to PR


From: Tom Tromey
Subject: Re: Canonical way to conditionally add (a large amount of) sources to PROG_SOURCES?
Date: 11 Jun 2001 13:45:14 -0600

>>>>> "Tim" == Tim Van Holder <address@hidden> writes:

Tim> I need to conditionally (based on a --with configure option)
Tim> add a fairly large number (~50) of sources to foo_SOURCES.

What version of automake are you using?

Tim> OPTIONAL=
Tim> if MYCONDITIONAL
Tim> OPTIONAL = lotsasource.c lotsayacc.y
Tim> endif

Yeah, this one probably won't work for now.  Try removing the initial
`OPTIONAL='.  Maybe that will work.

This is confusing, I agree.  We have most of the machinery to fix
this, but we haven't done the last parts yet.

Tim> if MYCONDITIONAL
Tim> OPTIONAL = lotsasource.c lotsayacc.y
Tim> else
Tim> OPTIONAL=
Tim> endif
Tim> foo_SOURCES = $(REGULAR) $(OPTIONAL)

This ought to work.
I wrote a test case to try it, and the test case passed.

Tim> OPTIONAL = lotsasource.c lotsayacc.y
Tim> if MYCONDITIONAL
Tim> foo_SOURCES = $(REGULAR) $(OPTIONAL)
Tim> else
Tim> foo_SOURCES = $(REGULAR)
Tim> endif

This also ought to work.
I modified my test case for the first one to look like this, and tried
it again.  Again it worked.

In both cases I'm using the cvs automake.

Tim> What is the proper way of handling such a situation?
Tim> (If it's in the manual, please point me to the correct
Tim> chapter; a cursory examination revealed nothing much).

The manual is in a state of flux.  I'll add a note to make sure
something about this ends up in the manual.

Tom



reply via email to

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