mirror of
https://github.com/moparisthebest/xeps
synced 2025-01-30 15:00:09 -05:00
make: Rerun xelatex to build ToC in PDFs
This commit is contained in:
parent
860f1ab116
commit
86c83102f4
7
Makefile
7
Makefile
@ -10,6 +10,8 @@ HTMLDEPS=xep.xsl $(CSSTARGETS) $(JSTARGETS)
|
||||
CSSTARGETS=$(OUTDIR)/xmpp.css $(OUTDIR)/prettify.css
|
||||
JSTARGETS=$(OUTDIR)/prettify.js
|
||||
|
||||
DO_XELATEX=cd $(OUTDIR); xelatex --interaction=nonstopmode -no-shell-escape "$(notdir $(basename $@)).tex" >/dev/null
|
||||
|
||||
|
||||
.PHONY: help
|
||||
help:
|
||||
@ -79,7 +81,10 @@ $(OUTDIR)/%.pdf: %.xml $(XMLDEPS) $(TEXMLDEPS)
|
||||
sed -i -e 's|\([\s"]\)\([^"]http://[^ "]*\)|\1\\path{\2}|g' \
|
||||
-e 's|\\hyperref\[#\([^}]*\)\]|\\hyperref\[\1\]|g' \
|
||||
-e 's|\\pageref{#\([^}]*\)}|\\pageref{\1}|g' "$(@:.pdf=.tex)"
|
||||
cd $(OUTDIR); xelatex -interaction=batchmode -no-shell-escape "$(notdir $(basename $@)).tex" && echo "Finished building $@"
|
||||
while ($(DO_XELATEX) ; \
|
||||
grep -q "Rerun to get" $(<:.xml=.log) ) do true; \
|
||||
done
|
||||
echo "Finished building $@"
|
||||
|
||||
$(JSTARGETS): $(OUTDIR)
|
||||
cp "$(notdir $@)" "$@"
|
||||
|
Loading…
Reference in New Issue
Block a user