This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Conditional Library Compilation


>>> "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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]