From 13890de7bb6920bfceffddeabf6b3ebb160e5e14 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Tue, 14 Jan 2003 07:26:21 +0000 Subject: [PATCH] For PR automake/382: * automake.texi (Yacc and Lex): Document `AM_YFLAGS = -d'. Explain BUILT_SOURCES is usually needed in this case. Reported by William S Fulton. --- ChangeLog | 7 +++++++ THANKS | 1 + automake.texi | 29 +++++++++++++++++++++++------ 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9c3e6917..1c4a27b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-01-14 Alexandre Duret-Lutz + + For PR automake/382: + * automake.texi (Yacc and Lex): Document `AM_YFLAGS = -d'. + Explain BUILT_SOURCES is usually needed in this case. + Reported by William S Fulton. + 2003-01-13 Alexandre Duret-Lutz Rename some files for the sake of 8+3 file systems. diff --git a/THANKS b/THANKS index deaa7e17..7d22ad69 100644 --- a/THANKS +++ b/THANKS @@ -203,4 +203,5 @@ Tom Epperly tepperly@llnl.gov Ulrich Drepper drepper@gnu.ai.mit.edu Vadim Zeitlin Vadim.zeitlin@dptmaths.ens-cachan.fr Werner Koch wk@isil.d.shuttle.de +William S Fulton wsf@fultondesigns.co.uk Yann Droneaud ydroneaud@meuh.eu.org diff --git a/automake.texi b/automake.texi index bc3dfddf..e01d300d 100644 --- a/automake.texi +++ b/automake.texi @@ -53,7 +53,7 @@ by the Foundation. @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}.@* @@ -2702,11 +2702,28 @@ When @code{yacc} is invoked, it is passed @samp{YFLAGS} and @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 -- 2.43.5