[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Conditional target
From: |
Sergio Belkin |
Subject: |
Re: Conditional target |
Date: |
Thu, 27 Jan 2011 09:15:45 -0300 |
2011/1/27 Ralf Wildenhues <address@hidden>:
> * 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
Thanks but i if I do that the static library is not appended at the
end, and so it fails....
>
> will be translated to something like
> variable = foo $(am__some_internal_helper_var1)
> address@hidden@am__some_internal_helper_var1 = bar
>
> and config.status substitutes @COND_TRUE@ with '#' or '' depending on
> whether the condition is true at configure time.
>
> Hope that helps.
>
> Cheers,
> Ralf
>
--
--
Sergio Belkin http://www.sergiobelkin.com
Watch More TV http://sebelk.blogspot.com
LPIC-2 Certified