This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: Conditional Library Compilation
- From: Alexandre Duret-Lutz <adl at src dot lip6 dot fr>
- To: "Drummonds, Scott B" <scott dot b dot drummonds at intel dot com>
- Cc: automake at gnu dot org
- Date: Tue, 03 Feb 2004 19:31:06 +0100
- Subject: Re: Conditional Library Compilation
- References: <92E67798C43ECE4691CCEE09662D2698BBD925@scsmsx402.sc.intel.com>
>>> "sbd" == Drummonds, Scott B <scott.b.drummonds@intel.com> writes:
sbd> Hi, everyone,
Hi,
Which version of Automake are you using? What make implementation?
[...]
sbd> the following doesn't work:
sbd> if FEATURE
sbd> EXTRA_LIBS=libMyLib.a
sbd> endif
sbd> noinst_LIBRARIES = ... $(EXTRA_LIBS)
What are the symptoms? (i.e., what "doesn't work" means?)
sbd> It seems that, when FEATURE is set, the code inside the conditional is
sbd> inserted after the noinst_LIBRARIES statement. As such, the EXTRA_LIBS
sbd> variable is empty and my additional library is not added as a target.
That shouldn't matter: $(xxx) are not evaluated when they appear
on the rhs of a `=', they are recursively expansed later when
used in a rule.
sbd> How do I have an additional library built based on a
sbd> Automake conditional?
What you describe works for me, it builds libMyLib.a iff
FEATURE is set.
--
Alexandre Duret-Lutz