Author :
Tom Tromey
Date :
2001-07-01 22:51:38
Hash :ffcacbab Message :2001-06-29 Tom Tromey <tromey@redhat.com>
* tests/cond11.test: Use `=', not `=='.
* tests/cond12.test: Look for automake in build directory, not
source directory.
2001-06-29 Richard Boulton <richard@tartarus.org>
* automake.in (conditionals_true_when): Pass first parameters by
reference, avoiding bug which put all parameters in @CONDS instead
of @WHENS. Report by Kalle Olavi Niemitalo.
Take a single WHEN instead of an array of WHENS.
Remove FIXME; can't now have an empty @WHENS.
(conditional_is_redundant): New sub.
(variable_conditions_reduce): Check whether each condition is
implied by any of the other conditions (other those already
discarded), rather than checking only against those already
considered (and kept). Also, fix sense of check: was keeping
tautologous terms instead of discarding them. Use
conditional_is_redundant instead of conditionals_true_when.
* tests/Makefile.am (TESTS): Added cond11.test and cond12.test.
* tests/cond11.test: New file.
* tests/cond12.test: New file.
tests/cond11.test
#! /bin/sh
# Test for bug in conditionals. From Richard Boulton.
# This checks that, if LDADD is set from a conditional variable
# and an AC_SUBST, the _DEPENDENCIES variable is set correctly.
. $srcdir/defs || exit 1
cat > configure.in << 'END'
AC_INIT(Makefile.am)
AM_INIT_AUTOMAKE(foo,0.0)
AC_PROG_CC
AM_CONDITIONAL(USE_A,[test x = x])
AC_OUTPUT(Makefile)
AC_SUBST(SUBSTVAR)
END
cat > Makefile.am << 'END'
if USE_A
foolibs=faz.la
else
foolibs=
endif
noinst_PROGRAMS = foo
foo_SOURCES = foo.c
LDADD = $(SUBSTVAR) $(foolibs)
END
: > config.guess
: > config.sub
: > compile
$ACLOCAL || exit 1
$AUTOMAKE || exit 1
#Should be two dependency setting lines
count=`grep 'foo_DEPENDENCIES =' Makefile.in | wc -l|sed 's/ //g'`
test "x$count" = "x2" &&
grep '^.USE_A_TRUE.foo_DEPENDENCIES =' Makefile.in