Closed tueda closed 3 years ago
The following seems to work, at least on Linux:
export TEXINPUTS := .:$(BUILDDIR):$(TEXINPUTS):
.tex.pdf:
@$(init_toolchain)
@$(call switch,$(typeset_mode), \
dvips, \
$(call typeset,$(latex)) && \
$(call exec,$(dvips) $(build_prefix)$*.dvi -o $(build_prefix)$*.ps) && \
$(call exec,$(ps2pdf) $(build_prefix)$*.ps), \
dvips_convbkmk, \
$(call typeset,$(latex)) && \
$(call exec,$(dvips) $(build_prefix)$*.dvi -o $(build_prefix)$*.ps) && \
$(call exec,$(convbkmk) $(build_prefix)$*.ps) && \
mv $(build_prefix)$*-convbkmk.ps $(build_prefix)$*.ps && \
$(call exec,$(ps2pdf) $(build_prefix)$*.ps), \
dvipdf, \
$(call typeset,$(latex)) && \
$(call exec,$(dvipdf) $(build_prefix)$*.dvi), \
pdflatex, \
$(call typeset,$(latex)) && \
$(mv_target) && \
$(mv_eps_converted_to_pdf), \
)
mv_eps_converted_to_pdf = $(if $(BUILDDIR),{ mv *-eps-converted-to.pdf $(BUILDDIR) >/dev/null 2>&1 || :; },:)
For EPS files,
pdflatex
performs automaticepstopdf
conversion and generates*-eps-converted-to.pdf
files in the current working directory. It would be nice if they could be put inBUILDDIR
.