mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -3463,10 +3463,9 @@ handle_require (location const *loc, char const *version)
|
||||
return;
|
||||
}
|
||||
required_version = major * 100 + minor;
|
||||
/* Pretend to be at least 3.2, even if we are only 3.1-211, as it
|
||||
allows us to check features published in 3.2 while developping
|
||||
3.2. */
|
||||
const char* api_version = "3.2";
|
||||
/* Pretend to be at least 3.4, to check features published in 3.4
|
||||
while developping it. */
|
||||
const char* api_version = "3.4";
|
||||
const char* package_version =
|
||||
strverscmp (api_version, PACKAGE_VERSION) > 0
|
||||
? api_version : PACKAGE_VERSION;
|
||||
|
||||
@@ -958,10 +958,9 @@ handle_require (location const *loc, char const *version)
|
||||
return;
|
||||
}
|
||||
required_version = major * 100 + minor;
|
||||
/* Pretend to be at least 3.2, even if we are only 3.1-211, as it
|
||||
allows us to check features published in 3.2 while developping
|
||||
3.2. */
|
||||
const char* api_version = "3.2";
|
||||
/* Pretend to be at least 3.4, to check features published in 3.4
|
||||
while developping it. */
|
||||
const char* api_version = "3.4";
|
||||
const char* package_version =
|
||||
strverscmp (api_version, PACKAGE_VERSION) > 0
|
||||
? api_version : PACKAGE_VERSION;
|
||||
|
||||
Reference in New Issue
Block a user