There is a couple of minor issues in Makefile WRT parallel runs of runfirstlatex.sh. When some of perfbook-xxx.tex files already exist, runfirstlatex.sh for other main perfbook-yyy.tex can be invoked prematurely before that .tex file gets ready. Fix it by adding stricter dependencies of perfbook-xxx.aux on perfbook-xxx.tex. Also sort out dependencies around here. autodate.tex now depends only on files in the Git repo. Instead, perfbook_flat.tex acts as a barrier between the file conversion phase and the pdflatex phase. Signed-off-by: Akira Yokosawa <akiyks@xxxxxxxxx> --- Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 6ee849fd..ee1880ff 100644 --- a/Makefile +++ b/Makefile @@ -222,18 +222,20 @@ $(PDFTARGETS): %.pdf: %.tex %.bbl $(PDFTARGETS:.pdf=.bbl): %.bbl: %.aux $(BIBSOURCES) bibtex $(basename $@) -$(PDFTARGETS:.pdf=.aux): $(LATEXGENERATED) $(LATEXSOURCES) $(LST_SOURCES) +$(PDFTARGETS:.pdf=.aux): %.aux: %.tex $(LATEXGENERATED) ifeq ($(NEWTXTEXT),) $(error Font package 'newtx' not found. See #9 in FAQ-BUILD.txt) endif sh utilities/runfirstlatex.sh $(basename $@) -autodate.tex: perfbook-lt.tex $(LATEXSOURCES) $(BIBSOURCES) \ - $(PDFTARGETS_OF_EPS) $(PDFTARGETS_OF_SVG) $(FCVSNIPPETS) $(FCVSNIPPETS_VIA_LTMS) \ - $(GITREFSTAGS) utilities/autodate.sh +autodate.tex: $(LATEXSOURCES) $(BIBSOURCES) $(SOURCES_OF_SNIPPET) \ + $(LST_SOURCES) $(FIGSOURCES) $(DOTSOURCES) $(EPSORIGIN) \ + $(SVGSOURCES) $(GITREFSTAGS) \ + utilities/autodate.sh sh utilities/autodate.sh -perfbook_flat.tex: autodate.tex +perfbook_flat.tex: autodate.tex $(PDFTARGETS_OF_EPS) $(PDFTARGETS_OF_SVG) \ + $(FCVSNIPPETS) $(FCVSNIPPETS_VIA_LTMS) ifndef LATEXPAND $(error --> $@: latexpand not found. Please install it) endif -- 2.17.1