>>> "RW" == Ralf Wildenhues <[EMAIL PROTECTED]> writes:
[...] >> @@ -5242,7 +5242,8 @@ >> >> # libtool is always able to put the object at the proper place, >> # so we do not have to require AM_PROG_CC_C_O when building .lo files. >> - err_var ($var, "compiling `$base.c' in subdir requires " >> + msg_var ('portabiliy', $var, RW> portability. Thanks. That means this line wasn't run by the test suite. Let's add a test case. 2006-03-10 Alexandre Duret-Lutz <[EMAIL PROTECTED]> * automake.in (lang_c_rewrite): Typo in previous change. * tests/ccnoco2.test: New file. * tests/Makefile.am (TESTS): Add ccnoco2.test. Index: automake.in =================================================================== RCS file: /cvs/automake/automake/automake.in,v retrieving revision 1.1617 diff -u -r1.1617 automake.in --- automake.in 10 Mar 2006 10:52:19 -0000 1.1617 +++ automake.in 10 Mar 2006 11:59:46 -0000 @@ -5242,7 +5242,7 @@ # libtool is always able to put the object at the proper place, # so we do not have to require AM_PROG_CC_C_O when building .lo files. - msg_var ('portabiliy', $var, + msg_var ('portability', $var, "compiling `$base.c' in subdir requires " . "`AM_PROG_CC_C_O' in `$configure_ac'", uniq_scope => US_GLOBAL, Index: tests/Makefile.am =================================================================== RCS file: /cvs/automake/automake/tests/Makefile.am,v retrieving revision 1.592 diff -u -r1.592 Makefile.am --- tests/Makefile.am 29 Jan 2006 17:35:12 -0000 1.592 +++ tests/Makefile.am 10 Mar 2006 11:59:46 -0000 @@ -74,6 +74,7 @@ canon4.test \ canon5.test \ ccnoco.test \ +ccnoco2.test \ check.test \ check2.test \ check3.test \ Index: tests/ccnoco2.test =================================================================== RCS file: tests/ccnoco2.test diff -N tests/ccnoco2.test --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ tests/ccnoco2.test 10 Mar 2006 11:59:47 -0000 @@ -0,0 +1,59 @@ +#! /bin/sh +# Copyright (C) 2006 Free Software Foundation, Inc. +# +# This file is part of GNU Automake. +# +# GNU Automake is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# GNU Automake is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Automake; see the file COPYING. If not, write to +# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. + +# Make sure Automake requires AM_PROG_CC_C_O when either per-targets +# flags or subdir-objects are used. + +. ./defs || exit 1 + +set -e + +cat >>configure.in <<EOF +AC_PROG_CC +AC_OUTPUT +EOF + +cat >Makefile.am <<EOF +bin_PROGRAMS = wish +wish_SOURCES = a.c +wish_CPPFLAGS = -DWHATEVER +EOF + +touch a.c + +$ACLOCAL +$AUTOCONF +AUTOMAKE_fails --copy --add-missing +grep 'Makefile.am:2:.*per-target.*AM_PROG_CC_C_O' stderr + + +cat >Makefile.am <<EOF +bin_PROGRAMS = wish +wish_SOURCES = sub/a.c +EOF + +mkdir sub +mv a.c sub + +$AUTOMAKE --copy --add-missing + +echo 'AUTOMAKE_OPTIONS = subdir-objects' >> Makefile.am +AUTOMAKE_fails --copy --add-missing +grep 'Makefile.am:2:.*subdir.*AM_PROG_CC_C_O' stderr -- Alexandre Duret-Lutz Shared books are happy books. http://www.bookcrossing.com/friend/gadl