1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
pdf: sms $(TARGET.pdf)
mpdf: sms $(MODS.pdf)
# LaTeX build rules:
#
# use non-interactive PDFLATEX (see above)
#
# _always_ delete pdf on error (otherwise, we end up with a corrupt
# pdf file and make saying "nothing to do" on the next run )
#
# make will delete temporary files (toc,sms,aux) afterwards
# (FIXME: why? should this be disabled or kept like that?)
#
# make pdf depend on its own .toc and .aux and global aux/sms files
$(TARGET.pdf): %.pdf: %.tex $(MODS) $(TARGET.parts) $(IMG)
$(PDFLATEX) $< || $(RM) $@
@echo
@if (test -e $(patsubst %.tex, %.idx, $<));\
then makeindex $(patsubst %.tex, %.idx, $<); fi
@echo
@if (grep "No file$(patsubst %.tex, %.bbl, $<)" $(patsubst %.tex, %.log, $<)> /dev/null);\
then bibtex $(patsubst %.tex, %, $<); fi
@echo
$(PDFLATEX) $< || $(RM) $@
@echo
@if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\
then $(PDFLATEX) $< || $(RM) $@; fi
@if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\
then $(PDFLATEX) $< || $(RM) $@; fi
$(MODS.pdf): %.pdf: %.tex
$(PDFLATEX) -jobname=$(basename $<) "\nonstopmode\input{$(MODS.pre)}\begin{document}\input{$<}\end{document}" || $(RM) $@
|