Tag
Hash :
91aa2b0b
Author :
Date :
2002-05-16T20:36:36
* automake.in (conditional_true_when): Return false if $WHEN == FALSE.
(conditional_is_redundant): Simplify.
(conditional_implies_one_of,
variable_not_always_defined_in_cond): New functions
(macro_define): Reject appends if the variable is not defined in
all conditions where `+=' applies.
(invert_conditions): Rewrite. Before this patch,
invert_conditions("A_TRUE B_TRUE", "A_TRUE B_FALSE", "A_FALSE")
would return ("A_FALSE B_TRUE", "A_FALSE B_TRUE"), which seems
wrong (these conditions implies "A_FALSE"). Now it outputs (),
which just means the input conditions cover all cases.
(variable_conditions_permutations): Never output FALSE conditions.
* tests/pluseq2.test, tests/pluseq3.test: Define data_DATA
in the CHECK_FALSE condition to fix the test.
* tests/pluseq5.test: Actually check the diagnostic.
* tests/pluseq9.test: New file.
* tests/Makefile.am (TESTS): Add pluseq9.test.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
#! /bin/sh
# Another `+=' test with conditionals.
. $srcdir/defs || exit 1
echo 'AM_CONDITIONAL(CHECK, true)' >> configure.in
cat > Makefile.am << 'END'
if CHECK
data_DATA = zar
else
data_DATA =
endif
if CHECK
data_DATA += \
doz
else
data_DATA += dog
endif
END
: > zar
: > doz
: > dog
set -e
$ACLOCAL || exit 1
$AUTOMAKE
grep '^@CHECK_TRUE@data_DATA = zar \\$' Makefile.in
grep '^@CHECK_TRUE@ doz$' Makefile.in
grep '^@CHECK_FALSE@data_DATA = dog$' Makefile.in
exit 0