From: Tom Tromey Date: Tue, 11 Aug 1998 03:13:59 +0000 (+0000) Subject: Fixed ansi2knr bug X-Git-Tag: Release-1-3b~4 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=cf277f33d1d7100b2d74dc3194ae8822bf483568;p=automake.git Fixed ansi2knr bug --- diff --git a/ChangeLog b/ChangeLog index 062aea18..8ba532b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Aug 10 20:57:35 1998 Tom Tromey + + * automake.in (handle_yacc_lex_cxx): Redirect ansi2knr output to + correct file. From Kave Ghazi. + Sun Aug 2 16:05:16 1998 Tom Tromey * Released 1.3a. diff --git a/automake.in b/automake.in index 352a674e..4a550cdb 100755 --- a/automake.in +++ b/automake.in @@ -1035,7 +1035,7 @@ sub handle_yacc_lex_cxx . '`if test -f $(srcdir)/' . $base . '.c' . '; then echo $(srcdir)/' . $base . '.c' . '; else echo ' . $base . '.c; fi` ' - . '| $(ANSI2KNR) ' . $base . "_.c\n"); + . '| $(ANSI2KNR) > ' . $base . "_.c\n"); push (@objects, $base . '_.o'); push (@objects, $base . '_.lo') if $seen_libtool; } diff --git a/tests/ChangeLog b/tests/ChangeLog index 7a8f5364..30c157d9 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +Mon Aug 10 21:05:15 1998 Tom Tromey + + * ansi3.test: New file. + Sat Jul 18 00:27:26 1998 Tom Tromey * recurs.test: New file. diff --git a/tests/Makefile.am b/tests/Makefile.am index 7e41beb2..4d0d3a1c 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -31,7 +31,8 @@ aclocal.test alpha.test whoami.test unused.test condman.test \ texinfo5.test aclocali.test texinfo6.test condman2.test colon4.test \ java.test sinclude.test javaprim.test javasubst.test aclocalii.test \ lex2.test libobj8.test version3.test instdata.test exdir2.test \ -colon5.test library.test syntax.test cond4.test cond5.test recurs.test +colon5.test library.test syntax.test cond4.test cond5.test recurs.test \ +ansi3.test EXTRA_DIST = defs $(TESTS) diff --git a/tests/Makefile.in b/tests/Makefile.in index be6af76c..4fded1ea 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -94,7 +94,8 @@ aclocal.test alpha.test whoami.test unused.test condman.test \ texinfo5.test aclocali.test texinfo6.test condman2.test colon4.test \ java.test sinclude.test javaprim.test javasubst.test aclocalii.test \ lex2.test libobj8.test version3.test instdata.test exdir2.test \ -colon5.test library.test syntax.test cond4.test cond5.test recurs.test +colon5.test library.test syntax.test cond4.test cond5.test recurs.test \ +ansi3.test EXTRA_DIST = defs $(TESTS) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs diff --git a/tests/ansi3.test b/tests/ansi3.test new file mode 100755 index 00000000..e42a7bde --- /dev/null +++ b/tests/ansi3.test @@ -0,0 +1,42 @@ +#! /bin/sh + +# Actual test of ansi2knr functionality. Relies on existence +# of working gcc. + +. $srcdir/defs || exit 1 + +cat > configure.in << 'END' +AC_INIT(hello.c) +AM_INIT_AUTOMAKE(hello,0.23) +AC_PROG_CC +AM_C_PROTOTYPES +AC_OUTPUT(Makefile) +END + +cat > Makefile.am << 'END' +AUTOMAKE_OPTIONS = ansi2knr +bin_PROGRAMS = hello +END + +cat > hello.c << 'END' +#include +int +main (int argc, char *argv[]) +{ + printf ("yeah, yeah\n"); + return 0; +} +END + +# Fail gracefully if no autoconf. +(autoconf --version) > /dev/null 2>&1 || exit 0 + +# Likewise for gcc. +(gcc -v) > /dev/null 2>&1 || exit 0 + +$ACLOCAL \ + && autoconf \ + && $AUTOMAKE -a \ + && CC='gcc -traditional' ./configure \ + && $MAKE ANSI2KNR=./ansi2knr U=_ \ + && ./hello