* 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) @COND_TRUE@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