Make sure -odir/foo.cc creates dir/location.hh etc.
* src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
(spec_file_prefix, spec_verbose_file, spec_graph_file)
(spec_defines_file): Now const.
(dir_prefix): New.
(short_base_name): Remove.
* src/files.c: Adjust.
(dirname.h): Include.
(base_name): Don't prototype it.
(finput): Remove, duplicates gram_in.
(full_base_name, short_base_name): Replace by...
(all_but_ext, all_but_tab_ext): these.
(compute_base_names): Rename as...
(compute_file_name_parts): this.
Update to compute the new variables, including dir_prefix.
Adjust dependencies.
* src/output.c (prepare): Output them.
* src/reader.c: Adjust to use gram_in, not finput.
* src/scan-skel.l (@dir_prefix@): New.
This commit is contained in:
Akim Demaille
2005-10-02 17:44:49 +00:00
parent ad6a9b97e2
commit 2b81e969ea
7 changed files with 98 additions and 63 deletions

View File

@@ -474,8 +474,7 @@ reader (void)
obstack_init (&pre_prologue_obstack);
obstack_init (&post_prologue_obstack);
finput = xfopen (grammar_file, "r");
gram_in = finput;
gram_in = xfopen (grammar_file, "r");
gram__flex_debug = trace_flag & trace_scan;
gram_debug = trace_flag & trace_parse;
@@ -523,7 +522,7 @@ reader (void)
if (! (nsyms <= SYMBOL_NUMBER_MAXIMUM && nsyms == ntokens + nvars))
abort ();
xfclose (finput);
xfclose (gram_in);
/* Assign the symbols their symbol numbers. Write #defines for the
token symbols into FDEFINES if requested. */