Hello,

Given this fragment:

bin_PROGRAMS = false true
true_SOURCES = false.c
true_CFLAGS = -DAM_TRUE
true_SHORTNAME = t
if FOO
false_SOURCES = false.c
false_CFLAGS = -DAM_FALSE
false_SHORTNAME = f
endif

I receive a warning for false_SHORTNAME:
Makefile.am:9: warning: automake does not support false_SHORTNAME being defined conditionally

What does that mean? Why is it unsupported? Other variables work just fine.

This is a problem for me, because I'm trying to construct the following:

root/Makefile.am:
if ENABLE_FOO
include foo/Makefile.inc
endif

root/foo/Makefile.inc
bin_PROGRAMS = foo
foo_SOURCES = foo.c
foo_SHORTNAME = foo

As of now, there is no way to achieve that as the warning also appears for foo_SHORTNAME. The workaround to move the conditional into root/foo/Makefile.inc is ugly and breaks modularization of the project.

Automake source code is a myth to me, I wasn't able to find the code that implements this limitation (only the place where the warning is printed (variable_value() => $self->check_defined_unconditionally in Variable.pm)

Best regards.

Reply via email to