]> granicus.if.org Git - graphviz/commit
gv: fixed possible races during docs build
authorJaroslav Škarvada <jskarvad@redhat.com>
Tue, 8 Jun 2021 20:43:53 +0000 (22:43 +0200)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 15 Jun 2021 00:11:01 +0000 (17:11 -0700)
commitf4cbffb7ed25e076b34db69ed664364a8db09ce3
treee30865f2ea2fb214f633a712ffc437daf8c9737a
parent20be95416a97dcff317e2928a13f33bde1c5de37
gv: fixed possible races during docs build

In tclpkg/gv, the gv_doc_writer.tcl is run multiple times during
the build. It is ineffective, but it shouldn't cause any troubles
with the serial build. Unfortunately, this is not the case with
the parallel builds where multiple parallel runs of the
gv_doc_writer.tcl can cause races leading to empty corresponding
ps and pdf files.

The correct solution would be to use the Rules with Grouped Targets [1],
unfortunately this GNU make feature has been introduced quite
recently which would break backward compatibility.

The proposed hack should cause the gv_doc_writer.tcl to be run
only once during the build process and it should work also with
the older 'make'. It is inspired by [2].

[1] https://www.gnu.org/software/make/manual/html_node/Multiple-Targets.html#Multiple-Targets
[2] https://stackoverflow.com/questions/2973445/gnu-makefile-rule-generating-a-few-targets-from-a-single-source-file

Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
tclpkg/gv/Makefile.am