automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

_SHORTNAME in conditional


From: Thomas Martitz
Subject: _SHORTNAME in conditional
Date: Tue, 5 Jan 2016 22:05:59 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

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

[Prev in Thread] Current Thread [Next in Thread]