This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: Primaries in Conditionals
- From: Ralf Corsepius <corsepiu at faw dot uni-ulm dot de>
- To: Fausto Sanchez <fas at andiamo dot com>
- Cc: Automake List <automake at gnu dot org>
- Date: 22 Feb 2002 08:41:04 +0100
- Subject: Re: Primaries in Conditionals
- References: <4.3.2.7.2.20020221181500.058f4550@andiamo.com>
Am Fre, 2002-02-22 um 03.23 schrieb Fausto Sanchez:
> Hi,
>
> Can anyone tell me how to suppress these warning from automake. I just upgraded
> to automake 1.5, and now these warnings are being displayed when running
> automake.
This kind of questions is going to be an FAQ ;)
> diag_LDADD = @LDFLAGS@ -L../common_objects -ldiagcommonobj -ldiageng -ltcl8.3
>
> #
> # Depending on the platform we will include either the linecard or
> supervisor objects.
> #
> if HWPLATFORM_LC1
> diag_LDADD += -L../lcp_objects -ldiaglcpobj
> endif
>
> if HWPLATFORM_SUP1
> diag_LDADD += -L../smp_objects -ldiagsmpobj
> endif
Makefile.am:
..
if HWPLATFORM_LC1
MORE = -L../lcp_objects -ldiaglcpobj
endif
if HWPLATFORM_SUP1
MORE = -L../smp_objects -ldiagsmpobj
endif
diag_LDADD = ... $(MORE)
..
Alternatively you could compose these flags from inside of your
configure.ac and let it be passed to the Makefile by AC_SUBST:
configure.ac:
[..]
if test ..; then
# LC1
MORE= ...
else
# SUP1
MORE= ...
fi
AC_SUBST(MORE)
[..]
Makefile.am:
diag_LDADD = ... @MORE@
> What would be the correct way to doing something like the above without
> getting automake to complain.
I'd use the second alternative, because it is more in the spirit of
autoconf (setup anything based upon conclusions from feature-checks).
Ralf