graph: prefer *.gv to *.dot

Reported by Hans Åberg.
https://lists.gnu.org/archive/html/help-bison/2019-02/msg00064.html

* src/files.c (spec_graph_file): Use `*.gv` when 3.4 or better,
otherwise `*.dot`.
* src/parse-gram.y (handle_require): Pretend we are already 3.4.
* doc/bison.texi: Adjust.
* tests/local.at, tests/output.at: Exercise this.
This commit is contained in:
Akim Demaille
2019-02-19 18:16:02 +01:00
parent 98020cedf7
commit bd55d43333
8 changed files with 42 additions and 28 deletions

View File

@@ -342,7 +342,8 @@ compute_output_file_names (void)
if (graph_flag)
{
if (! spec_graph_file)
spec_graph_file = concat2 (all_but_tab_ext, ".dot");
spec_graph_file = concat2 (all_but_tab_ext,
304 <= required_version ? ".gv" : ".dot");
output_file_name_check (&spec_graph_file, false);
}