aboutsummaryrefslogtreecommitdiff
path: root/ylwrap
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2024-05-08 18:55:18 +0100
committerAndrew Burgess <aburgess@redhat.com>2024-06-24 12:13:57 +0100
commitf4aca14e5fbb1e60d1d2f38f1dc41e9292ba95d5 (patch)
tree6d43be42492c4bc07e1ac63bb4f2520d3e16bf71 /ylwrap
parentf31b12c215571ee2348d20cd0cbc065ea631a765 (diff)
downloadbinutils-f4aca14e5fbb1e60d1d2f38f1dc41e9292ba95d5.zip
binutils-f4aca14e5fbb1e60d1d2f38f1dc41e9292ba95d5.tar.gz
binutils-f4aca14e5fbb1e60d1d2f38f1dc41e9292ba95d5.tar.bz2
gdb/doc: fix parallel build of refcard related targets
There are two problems we encounter when trying to build the refcard related target in parallel, i.e.: $ make -j20 -C gdb/doc/ refcard.dvi refcard.ps refcard.pdf These problems are: (1) The refcard.dvi and refcard.pdf targets both try and generate the tmp.sed and sedref.tex files. If two make threads end up trying to create these files at the same time then the result is these files become corrupted. I've fixed this by creating a new rule that creates sedref.tex, both refcard.dvi and refcard.pdf now depend on this, and make will build sedref.tex just once. The tmp.sed file is now generated as refcard.sed, this is generated and deleted as a temporary file within the sedref.tex recipe. (2) Having created sedref.tex the recipes for refcard.dvi and refcard.pdf both run various LaTeX based tools with sedref.tex as the input file. The problem with this is that these tools all rely on creating temporary files calls sedref.*. If the refcard.dvi and refcard.pdf rules run at the same time then these temporary files clash and overwrite each other causing the build to fail. We already copy the result file in order to rename it, our input file is sedref.tex which results in an output file named sedref.dvi or sedref.pdf, but we actually want refcard.dvi or refcard.pdf. So within the recipe for refcard.dvi I copy the input file from sedref.tex to sedref_dvi.tex. Now all the temp files are named sedref_dvi.* and the output is sedref_dvi.dvi, I then rename this new output file to refcard.dvi. I've done the same thing for refcard.pdf, but I copy the input to sedref_pdf.tex. In this way the temp files no longer clash, and both recipes can safely run in parallel. After this commit I was able to reliably build all of the refcard targets in parallel. There should be no change in the final file. Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'ylwrap')
0 files changed, 0 insertions, 0 deletions