[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[automake-commit] branch master updated: doc: add advice to list Yacc/Le
From: |
Karl Berry |
Subject: |
[automake-commit] branch master updated: doc: add advice to list Yacc/Lex generated sources in BUILT_SOURCES. |
Date: |
Sun, 10 Dec 2023 18:12:11 -0500 |
This is an automated email from the git hooks/post-receive script.
karl pushed a commit to branch master
in repository automake.
View the commit online:
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=0fbca7e74771b2aef72631ae0db55e6c8fda65c7
The following commit(s) were added to refs/heads/master by this push:
new 0fbca7e74 doc: add advice to list Yacc/Lex generated sources in
BUILT_SOURCES.
0fbca7e74 is described below
commit 0fbca7e74771b2aef72631ae0db55e6c8fda65c7
Author: Reuben Thomas <rrt@sc3d.org>
AuthorDate: Sun Dec 10 15:12:00 2023 -0800
doc: add advice to list Yacc/Lex generated sources in BUILT_SOURCES.
For https://bugs.gnu.org/62791.
* doc/automake.texi (Yacc and Lex): it seems to be necessary to
list the generated C source file for a Yacc/Lex file, as well as the
header file, in BUILT_SOURCES.
---
doc/automake.texi | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/doc/automake.texi b/doc/automake.texi
index e53a44332..77292288d 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -6329,7 +6329,8 @@ extensions @file{.l}, @file{.ll}, @file{.l++},
@file{.lxx}, and
@file{.lpp} are recognized.
You should never explicitly mention the intermediate (C or C++) file
-in any @code{SOURCES} variable; only list the source file.
+in any @code{SOURCES} variable (except @code{BUILT_SOURCES}, see below);
+only list the source file.
The intermediate files generated by @command{yacc} (or @command{lex})
will be included in any distribution that is made. That way the user
@@ -6359,11 +6360,11 @@ 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.
+is listing the header file, and the corresponding C file, in
+@code{BUILT_SOURCES} (@pxref{Sources}) as follows.
@example
-BUILT_SOURCES = parser.h
+BUILT_SOURCES = parser.h parser.c
AM_YFLAGS = -d
bin_PROGRAMS = foo
foo_SOURCES = @dots{} parser.y @dots{}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [automake-commit] branch master updated: doc: add advice to list Yacc/Lex generated sources in BUILT_SOURCES.,
Karl Berry <=