Skip to content

Commit

Permalink
docs: avoid concurrency issues when generating images in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
tarikgraba committed Oct 5, 2024
1 parent 1bf908d commit 339e801
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions docs/source/_images/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
all: examples all_tex tidy
all: examples all_tex

# set a fake time in pdf generation to prevent unnecessary differences in output
FAKETIME := TZ='Z' faketime -f '2022-01-01 00:00:00 x0,001'
Expand Down Expand Up @@ -31,14 +31,13 @@ all_tex: $(TEX_FILES:.tex=.pdf) $(TEX_FILES:.tex=.svg)

%.pdf: %.tex
cd $(@D) && $(FAKETIME) pdflatex $(<F) --interaction=nonstopmode
rm -f $(*).aux $(*).log

%.svg: %.pdf
pdf2svg $< $@

.PHONY: clean tidy
tidy:
rm -f **/*.log **/*.aux
.PHONY: clean

clean: tidy
clean:
rm -rf code_examples
rm -f **/*.pdf **/*.svg

0 comments on commit 339e801

Please sign in to comment.