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.
#! /bin/sh
# Check basic use of conditionals.
. $srcdir/defs || exit 1
cat > configure.in << 'END'
AM_INIT_AUTOMAKE(nonesuch, nonesuch)
AM_CONDITIONAL(TEST, true)
AC_OUTPUT(Makefile)
END
cat > Makefile.am << 'END'
if TEST
target: true
action
else
target: false
endif
END
set -e
$AUTOMAKE
grep '^@TEST_TRUE@target: true' Makefile.in
grep '^@TEST_TRUE@ action' Makefile.in
grep '^@TEST_FALSE@target: false' Makefile.in
exit 0