From: Brian G. <br...@ge...> - 2005-09-27 01:49:01
|
On Sep 26, 2005, at 4:23 PM, Richard vaughan wrote: > > The reason I did it that way at all is because I couldn't figure > out the syntax for a two-condition conditional. > > Here's your code: > > noinst_PROGRAMS = > if INCLUDE_BOOST_SIGNALS > noinst_PROGRAMS += test > endif > > but originally building test also depended on BUILD_TESTS (or > similar) being set. Automake's 'if' only allows one variable to be > tested, and I couldn't get a test-within a test to work. > > If BUILD_TESTS is no longer to be used, the problem goes away. But > multiple conditions might come up elsewhere...? That's a good point; I guess I had thrown away WITH_TESTS along the way... According to the automake docs, you can nest conditionals to any depth. I've just checked in the following (in client_libs/libplayerc+ +/test/Makefile.am): noinst_PROGRAMS = if INCLUDE_BOOST_SIGNALS if WITH_TESTS noinst_PROGRAMS += test endif endif automake accepts this syntax and 'test' does not get built on my machine (which is correct, since I don't have Boost installed). brian. -- Brian Gerkey br...@ge... http://gerkey.org |