2 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Test for ansi2knr in another directory.
22 cat > configure.
in << 'END'
24 AM_INIT_AUTOMAKE
(liver
, 0.23)
27 AC_OUTPUT
(Makefile one
/Makefile two
/Makefile
)
30 cat > Makefile.am
<< 'END'
36 cat > one
/Makefile.am
<< 'END'
37 AUTOMAKE_OPTIONS
= ansi2knr
41 cat > two
/Makefile.am
<< 'END'
42 AUTOMAKE_OPTIONS
= ..
/one
/ansi2knr
46 cat > one
/joe.c
<< 'END'
49 main
(int argc
, char
*argv
[])
56 cat > two
/maude.c
<< 'END'
59 main
(int argc
, char
*argv
[])
69 $AUTOCONF -Wno-obsolete
70 $AUTOMAKE -Wno-obsolete -a
76 # This is ugly! If we set U at make time then the "wrong" file gets
78 find .
-name '*.Po' -print \
80 base
="`echo $file | sed -e 's/\.Po//'`"
84 # So is this! If we set ANSI2KNR on the make command line then the
85 # wrong value is passed to two's Makefile.
86 mv one
/Makefile one
/Makefile.old
87 sed -e 's,ANSI2KNR =,ANSI2KNR = ./ansi2knr,' < one
/Makefile.old
> one
/Makefile