traced from configure.ac.
* automake.in (macro_define): Don't accept to override an AC_SUBST
or Automake variable in a new condition.
* tests/cond23.test, tests/cond24.test: New file.
* tests/Makefile.am (TESTS): Add cond23.test and cond24.test.
Reported by Patrik Weiskirchre.
+2002-06-19 Alexandre Duret-Lutz <duret_g@epita.fr>
+
+ * lib/am/lang-compile.am (%FPFX%DEPMODE): Delete. This is now
+ traced from configure.ac.
+
+ * automake.in (macro_define): Don't accept to override an AC_SUBST
+ or Automake variable in a new condition.
+ * tests/cond23.test, tests/cond24.test: New file.
+ * tests/Makefile.am (TESTS): Add cond23.test and cond24.test.
+ Reported by Patrik Weiskirchre.
+
2002-06-19 Alexandre Duret-Lutz <duret_g@epita.fr>
* tests/nobase.test, tests/pr204.test, tests/pr300-lib.test,
Olivier Louchart-Fletcher olivier@zipworld.com.au
Olly Betts olly@muscat.co.uk
Patrick Welche prlw1@newn.cam.ac.uk
+Patrik Weiskircher me@justp.at
Paul Berrevoets paul@swi.com
Paul D. Smith psmith@BayNetworks.COM
Paul Eggert eggert@twinsun.com
else
{
# There must be no previous value unless the user is redefining
- # an Automake variable or an AC_SUBST variable.
+ # an Automake variable or an AC_SUBST variable for an existing
+ # condition.
check_ambiguous_conditional ($var, $cond)
- unless ($var_is_am{$var} && !$var_is_am
- || exists $configure_vars{$var});
+ unless (($var_is_am{$var} && !$var_is_am
+ || exists $configure_vars{$var})
+ && exists $var_value{$var}{$cond});
$var_value{$var}{$cond} = $value;
}
## This file is read once per *language*, not per extension.
-## ----------------------------- ##
-## Common to all the languages. ##
-## ----------------------------- ##
-
-## Dependency tracking.
-if %AMDEP%
-%FPFX%DEPMODE = @%FPFX%DEPMODE@
-endif %AMDEP%
-
-
-
## ------------------------- ##
## Preprocessed Fortran 77. ##
## ------------------------- ##
cond20.test \
cond21.test \
cond22.test \
+cond23.test \
+cond24.test \
condd.test \
condincl.test \
condincl2.test \
cond20.test \
cond21.test \
cond22.test \
+cond23.test \
+cond24.test \
condd.test \
condincl.test \
condincl2.test \
--- /dev/null
+#!/bin/sh
+
+# Check that conditional redefinitions of AC_SUBST'ed variables are detected.
+# Report from Patrik Weiskircher
+
+. $srcdir/defs
+
+set -e
+
+cat >>configure.in <<EOF
+AM_CONDITIONAL([COND], [true])
+AC_OUTPUT
+EOF
+
+cat >Makefile.am <<EOF
+if COND
+libdir = mumble
+endif
+EOF
+
+$ACLOCAL
+$AUTOMAKE 2>stderr && exit 1
+grep 'libdir was already defined' stderr
--- /dev/null
+#!/bin/sh
+
+# Check that conditional redefinitions of AC_SUBST'ed variables are detected.
+# Report from Patrik Weiskircher
+
+. $srcdir/defs
+
+set -e
+
+cat >>configure.in <<EOF
+AC_SUBST([foo], [bar])
+AM_CONDITIONAL([COND], [true])
+AC_OUTPUT
+EOF
+
+cat >Makefile.am <<EOF
+if COND
+foo = baz
+endif
+EOF
+
+$ACLOCAL
+$AUTOMAKE 2>stderr && exit 1
+grep 'foo was already defined' stderr