[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Conditional target
From: |
Ralf Wildenhues |
Subject: |
Re: Conditional target |
Date: |
Thu, 27 Jan 2011 08:08:40 +0100 |
User-agent: |
Mutt/1.5.20 (2010-08-04) |
* Sergio Belkin wrote on Thu, Jan 27, 2011 at 04:40:10AM CET:
> tests = $(EXTRA_PROGRAMS)
> if forcestatic
> tests: LIBS += $(STATIC_RESOLV)
> end if
>
> The problem is that automake it complains that .
>
> tests was already defined in condition forcestatic, which is included
> in condition TRUE ...
> Makefile.am:150: ... `tests' previously defined here
(besides the typo that was already noted:)
Automake does not understand GNU make-style target-specific variable
settings
target: variable = setting
target: variable += setting
What it does interpret is Automake conditionals that are evaluated at
config.status time. And it interprets += itself by flattening it:
variable = foo
if COND
variable += bar
endif
will be translated to something like
variable = foo $(am__some_internal_helper_var1)
@address@hidden = bar
and config.status substitutes @COND_TRUE@ with '#' or '' depending on
whether the condition is true at configure time.
Hope that helps.
Cheers,
Ralf