@page
@vskip 0pt plus 1filll
-Copyright @copyright{} 1995, 1996, 2000, 2001, 2002 Free Software Foundation, Inc.
+Copyright @copyright{} 1995, 1996, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
@sp 2
This is the first edition of the GNU Automake documentation,@*
and is consistent with GNU Automake @value{VERSION}.@*
@samp{AM_YFLAGS}. The former is a user variable and the latter is
intended for the @file{Makefile.am} author.
-Similarly, if a @code{lex} source file is seen, then your
-@file{configure.in} must define the variable @samp{LEX}. You can use
-@samp{AC_PROG_LEX} to do this (@pxref{Particular Programs, , Particular
-Program Checks, autoconf, The Autoconf Manual}), but using
-@code{AM_PROG_LEX} macro (@pxref{Macros}) is recommended.
+@samp{AM_YFLAGS} is usually used to pass the @code{-d} option to
+@code{yacc}. Automake knows what this means and will automatically
+adjust its rules to update and distribute the header file built by
+@code{yacc -d}. What Automake cannot guess, though, is where this
+header will be used: it is up to you to ensure the header gets built
+before it is first used. Typically this is necessary in order for
+dependency tracking to work when the header is included by another
+file. The common solution is listing the header file in
+@code{BUILT_SOURCES} (@pxref{Sources}) as follows.
+
+@example
+BUILT_SOURCES = parser.h
+AM_YFLAGS = -d
+bin_PROGRAMS = foo
+foo_SOURCES = @dots{} parser.y @dots{}
+@end example
+
+If a @code{lex} source file is seen, then your @file{configure.in}
+must define the variable @samp{LEX}. You can use @samp{AC_PROG_LEX}
+to do this (@pxref{Particular Programs, , Particular Program Checks,
+autoconf, The Autoconf Manual}), but using @code{AM_PROG_LEX} macro
+(@pxref{Macros}) is recommended.
When @code{lex} is invoked, it is passed @samp{LFLAGS} and
@samp{AM_LFLAGS}. The former is a user variable and the latter is