Tag
Hash :
1b09f1d2
Author :
Date :
2001-02-25T18:42:41
Internally just store the conditionals as space separated lists of CONDITIONS (instead of @CONDITIONS@). * automake.in (&conditional_true_when, &variable_conditions_sub): Split conditions at spaces. (&handle_dependencies, &variable_conditions_permutations): Don't put @ around conditions. (&variable_conditions_cmp): There are no @ to strip. (&make_condition): New. (&define_pretty_variable, &read_main_am_file, &read_am_file): Use it. (&read_main_am_file, &read_am_file): Stop playing with @ by hand. Join @conditional_stack with spaces. (&read_main_am_file): Adjust the output of variables. Output `TRUE = true' under the condition `TEST' as `@TEST@TRUE = true' and no longer `@TEST@TRUE = @TEST@true'. (&variable_conditions_cmp): Rename as... (&by_condition): this. Sort in a human pleasant order. Use it everywhere a human can see conditions. (&variable_conditions_reduce): Don't sort conditions, that's pointless. * tests/cond.test, ctarget1.test, pluseq3.test: Strengthen.
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
#! /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
endif
if CHECK
data_DATA += \
doz
else
data_DATA += dog
endif
END
: > zar
: > doz
: > dog
set -e
$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