mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 14:53:03 +00:00
Implement --trace=m4.
* src/getargs.c (trace_types, trace_args): Accept trace_m4. * src/output.c (output_skeleton): When set, pass -dV to m4. Factor the handling of flags in m4. * src/output.c (prepare): Rename the muscle names debug, defines, error_verbose to debug_flag, defines_flag, error_verbose_flag. * data/c.m4: Adjust. (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New. Use b4_define_flag_if to define other b4_FLAG_if macros. (b4_location_if): As a consequence, rename as... (b4_locations_if): this, for consistency. Adjust all the skeletons.
This commit is contained in:
11
src/output.c
11
src/output.c
@@ -501,7 +501,7 @@ output_skeleton (void)
|
||||
FILE *in;
|
||||
FILE *out;
|
||||
int filter_fd[2];
|
||||
char const *argv[5];
|
||||
char const *argv[6];
|
||||
pid_t pid;
|
||||
|
||||
/* Compute the names of the package data dir and skeleton file.
|
||||
@@ -538,7 +538,8 @@ output_skeleton (void)
|
||||
argv[1] = full_m4sugar;
|
||||
argv[2] = "-";
|
||||
argv[3] = full_skeleton;
|
||||
argv[4] = NULL;
|
||||
argv[4] = trace_flag & trace_m4 ? "-dV" : NULL;
|
||||
argv[5] = NULL;
|
||||
|
||||
init_subpipe ();
|
||||
pid = create_subpipe (argv, filter_fd);
|
||||
@@ -582,11 +583,11 @@ static void
|
||||
prepare (void)
|
||||
{
|
||||
/* Flags. */
|
||||
MUSCLE_INSERT_BOOL ("debug", debug_flag);
|
||||
MUSCLE_INSERT_BOOL ("debug_flag", debug_flag);
|
||||
MUSCLE_INSERT_BOOL ("defines_flag", defines_flag);
|
||||
MUSCLE_INSERT_BOOL ("error_verbose", error_verbose);
|
||||
MUSCLE_INSERT_BOOL ("error_verbose_flag", error_verbose);
|
||||
MUSCLE_INSERT_BOOL ("locations_flag", locations_flag);
|
||||
MUSCLE_INSERT_BOOL ("pure", pure_parser);
|
||||
MUSCLE_INSERT_BOOL ("pure_flag", pure_parser);
|
||||
MUSCLE_INSERT_BOOL ("synclines_flag", !no_lines_flag);
|
||||
|
||||
/* File names. */
|
||||
|
||||
Reference in New Issue
Block a user