diff -p -u -r automake_branch-real-1-5_patch1/ChangeLog automake_branch-real-1-5_patch2/ChangeLog --- automake_branch-real-1-5_patch1/ChangeLog Sat Aug 18 15:05:42 2001 +++ automake_branch-real-1-5_patch2/ChangeLog Wed Aug 22 02:18:15 2001 @@ -1,3 +1,13 @@ +2001-08-21 Richard Boulton + + * lib/am/yacc.am: Fix generic dependency for header files: call + make to build the .c file. Remove FIXME comment, since this rule + _does_ now work (albeit, not particularly efficiently). + Non-generic rule changed to depend on %OBJ% (the .c file) rather + than %SOURCE% (the .y file) + * tests/yacc7.test: New file + * tests/Makefile.am (TESTS): Added yacc7.test + 2001-08-18 Richard Boulton * automake.in (read_am_file): Give an error if an automake comment diff -p -u -r automake_branch-real-1-5_patch1/lib/am/yacc.am automake_branch-real-1-5_patch2/lib/am/yacc.am --- automake_branch-real-1-5_patch1/lib/am/yacc.am Sun Jun 24 04:38:26 2001 +++ automake_branch-real-1-5_patch2/lib/am/yacc.am Wed Aug 22 02:16:40 2001 @@ -32,10 +32,9 @@ else !%?MORE-THAN-ONE% endif !%?MORE-THAN-ONE% ## Also generate a dependency for the .h file. -## FIXME: does this sort of suffix rule really work? if %?GENERIC% .%EXT%.h: - @: + @$(MAKE) %BASE%.%DERIVED-EXT% else !%?GENERIC% -%BASE%.h: %SOURCE% +%BASE%.h: %OBJ% endif !%?GENERIC% diff -p -u -r automake_branch-real-1-5_patch1/tests/Makefile.am automake_branch-real-1-5_patch2/tests/Makefile.am --- automake_branch-real-1-5_patch1/tests/Makefile.am Sat Aug 18 15:03:12 2001 +++ automake_branch-real-1-5_patch2/tests/Makefile.am Tue Aug 21 21:23:34 2001 @@ -327,6 +327,7 @@ yacc3.test \ yacc4.test \ yacc5.test \ yacc6.test \ +yacc7.test \ yaccpp.test \ yaccvpath.test diff -p -u -r automake_branch-real-1-5_patch1/tests/Makefile.in automake_branch-real-1-5_patch2/tests/Makefile.in --- automake_branch-real-1-5_patch1/tests/Makefile.in Sat Aug 18 15:03:15 2001 +++ automake_branch-real-1-5_patch2/tests/Makefile.in Tue Aug 21 21:23:39 2001 @@ -395,6 +395,7 @@ yacc3.test \ yacc4.test \ yacc5.test \ yacc6.test \ +yacc7.test \ yaccpp.test \ yaccvpath.test diff -p -u -r automake_branch-real-1-5_patch1/tests/yacc7.test automake_branch-real-1-5_patch2/tests/yacc7.test --- automake_branch-real-1-5_patch1/tests/yacc7.test Thu Jan 1 01:00:00 1970 +++ automake_branch-real-1-5_patch2/tests/yacc7.test Tue Aug 21 21:01:11 2001 @@ -0,0 +1,42 @@ +#! /bin/sh + +# Test to make sure dependencies are generated correctly for .h files. +# Report from Richard Boulton. + +. $srcdir/defs || exit 1 + +$needs_gnu_make +$needs_autoconf + +cat > configure.in << 'END' +AC_INIT +AM_INIT_AUTOMAKE(nonesuch, nonesuch) +AC_PROG_INSTALL +AC_PROG_MAKE_SET +AC_PROG_CC +AC_PROG_YACC +AC_OUTPUT(Makefile) +END + +cat > Makefile.am << 'END' +bin_PROGRAMS = foo +foo_SOURCES = foo.y +YFLAGS = -d +END + +cat > foo.y << 'END' +%% +WORD: "up"; +%% +END + +$ACLOCAL || exit 1 +$AUTOMAKE -a || exit 1 +$AUTOCONF || exit 1 +./configure || exit 1 + +$MAKE foo.h || exit 1 + +test -e foo.h || exit 1 + +exit 0