This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: Help with @some_configure_var@ variables in automake files.
- From: Alexandre Duret-Lutz <duret_g at lrde dot epita dot fr>
- To: "Iseri, Jerry" <Jerry dot Iseri at spirentcom dot com>
- Cc: "'automake at gnu dot org'" <automake at gnu dot org>
- Date: Thu, 31 Oct 2002 17:33:11 +0100
- Subject: Re: Help with @some_configure_var@ variables in automake files.
- References: <8AC36D3167EED41184C800508BD954050379B2AB@apollo.adtech-inc.com>
>>> "Jerry" == Iseri, Jerry <Jerry.Iseri@SpirentCom.COM> writes:
Jerry> Is there documentation on where configuration variables are
Jerry> allowed in automake files?
Not in a single place.
You can use them almost anywhere.
Using them is tricky in a few places where they hide useful
information to Automake. E.g., Automake needs to know all
sources that will be compiled, but cannot guess the possible
values of @MUMBLE@. In such cases you have to list the hidden
values using an EXTRA_ variable (for instance grep the manual
for EXTRA_hello_SOURCES or EXTRA_PROGRAMS).
Jerry> Here's a small example:
Jerry> #Is this supported?
Jerry> AM_CPPFLAGS = @MY_EXTRA_FLAGS@
Automake doesn't care about the content of AM_CPPFLAGS, so you
can set it as you wish.
Jerry> noinst_PROGRAMS = foo
Jerry> # This is documented as not allowed.
Jerry> foo_SOURCES = @MY_SOURCES@
You can do this if you list the possible values of @MY_SOURCES@ in
EXTRA_foo_SOURCES = foo.c foo.h ...
Jerry> foo_LDADD = @HOW_ABOUT_THIS@
If @HOW_ABOUT_THIS@ contains object or libraries, you'll also
want to redefine foo_DEPENDENCIES (grep the manual for
maude_DEPENDENCIES).
--
Alexandre Duret-Lutz