mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-22 02:33:03 +00:00
traces: show the full m4 invocation
Unfortunately the effect of -dV is still position independent. * src/output.c (output_skeleton): here.
This commit is contained in:
26
src/output.c
26
src/output.c
@@ -698,17 +698,6 @@ output_skeleton (void)
|
|||||||
|
|
||||||
/* Create an m4 subprocess connected to us via two pipes. */
|
/* Create an m4 subprocess connected to us via two pipes. */
|
||||||
|
|
||||||
if (trace_flag & trace_tools)
|
|
||||||
fprintf (stderr, "running: %s %s - %s %s\n",
|
|
||||||
m4, m4sugar, m4bison, skel);
|
|
||||||
|
|
||||||
/* Some future version of GNU M4 (most likely 1.6) may treat the -dV in a
|
|
||||||
position-dependent manner. Keep it as the first argument so that all
|
|
||||||
files are traced.
|
|
||||||
|
|
||||||
See the thread starting at
|
|
||||||
<http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>
|
|
||||||
for details. */
|
|
||||||
int filter_fd[2];
|
int filter_fd[2];
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
{
|
{
|
||||||
@@ -730,6 +719,13 @@ output_skeleton (void)
|
|||||||
|
|
||||||
argv[i++] = "-I";
|
argv[i++] = "-I";
|
||||||
argv[i++] = datadir;
|
argv[i++] = datadir;
|
||||||
|
/* Some future version of GNU M4 (most likely 1.6) may treat the
|
||||||
|
-dV in a position-dependent manner. Keep it as the first
|
||||||
|
argument so that all files are traced.
|
||||||
|
|
||||||
|
See the thread starting at
|
||||||
|
<http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>
|
||||||
|
for details. */
|
||||||
if (trace_flag & trace_m4)
|
if (trace_flag & trace_m4)
|
||||||
argv[i++] = "-dV";
|
argv[i++] = "-dV";
|
||||||
argv[i++] = m4sugar;
|
argv[i++] = m4sugar;
|
||||||
@@ -739,6 +735,14 @@ output_skeleton (void)
|
|||||||
argv[i++] = NULL;
|
argv[i++] = NULL;
|
||||||
aver (i <= ARRAY_CARDINALITY (argv));
|
aver (i <= ARRAY_CARDINALITY (argv));
|
||||||
|
|
||||||
|
if (trace_flag & trace_tools)
|
||||||
|
{
|
||||||
|
fputs ("running:", stderr);
|
||||||
|
for (int j = 0; argv[j]; ++j)
|
||||||
|
fprintf (stderr, " %s", argv[j]);
|
||||||
|
fputc ('\n', stderr);
|
||||||
|
}
|
||||||
|
|
||||||
/* The ugly cast is because gnulib gets the const-ness wrong. */
|
/* The ugly cast is because gnulib gets the const-ness wrong. */
|
||||||
pid = create_pipe_bidi ("m4", m4, (char **)(void*)argv, false, true,
|
pid = create_pipe_bidi ("m4", m4, (char **)(void*)argv, false, true,
|
||||||
true, filter_fd);
|
true, filter_fd);
|
||||||
|
|||||||
Reference in New Issue
Block a user