From: Alexandre Duret-Lutz Date: Wed, 19 Jun 2002 19:57:32 +0000 (+0000) Subject: * lib/am/lang-compile.am (%FPFX%DEPMODE): Delete. This is now X-Git-Tag: Release-1-6b~52 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=04ead795dba69875ad843a9e66f867068daf45c7;p=automake.git * 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. --- diff --git a/ChangeLog b/ChangeLog index a45e021e..69d3f2f0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2002-06-19 Alexandre Duret-Lutz + + * 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 * tests/nobase.test, tests/pr204.test, tests/pr300-lib.test, diff --git a/THANKS b/THANKS index 6f824095..f7ffaf27 100644 --- a/THANKS +++ b/THANKS @@ -136,6 +136,7 @@ OKUJI Yoshinori okuji@kuicr.kyoto-u.ac.jp 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 diff --git a/automake.in b/automake.in index 3ed14df1..f639dc02 100755 --- a/automake.in +++ b/automake.in @@ -5911,10 +5911,12 @@ sub macro_define ($$$$$$) 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; } diff --git a/lib/am/lang-compile.am b/lib/am/lang-compile.am index 02def500..39adfc29 100644 --- a/lib/am/lang-compile.am +++ b/lib/am/lang-compile.am @@ -18,17 +18,6 @@ ## 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. ## ## ------------------------- ## diff --git a/tests/Makefile.am b/tests/Makefile.am index c86a4238..a6cbae92 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -86,6 +86,8 @@ cond19.test \ cond20.test \ cond21.test \ cond22.test \ +cond23.test \ +cond24.test \ condd.test \ condincl.test \ condincl2.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 13332ba5..571193b7 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -172,6 +172,8 @@ cond19.test \ cond20.test \ cond21.test \ cond22.test \ +cond23.test \ +cond24.test \ condd.test \ condincl.test \ condincl2.test \ diff --git a/tests/cond23.test b/tests/cond23.test new file mode 100755 index 00000000..8de8a5a9 --- /dev/null +++ b/tests/cond23.test @@ -0,0 +1,23 @@ +#!/bin/sh + +# Check that conditional redefinitions of AC_SUBST'ed variables are detected. +# Report from Patrik Weiskircher + +. $srcdir/defs + +set -e + +cat >>configure.in <Makefile.am <stderr && exit 1 +grep 'libdir was already defined' stderr diff --git a/tests/cond24.test b/tests/cond24.test new file mode 100755 index 00000000..32d5e921 --- /dev/null +++ b/tests/cond24.test @@ -0,0 +1,24 @@ +#!/bin/sh + +# Check that conditional redefinitions of AC_SUBST'ed variables are detected. +# Report from Patrik Weiskircher + +. $srcdir/defs + +set -e + +cat >>configure.in <Makefile.am <stderr && exit 1 +grep 'foo was already defined' stderr