24 lines
856 B
Makefile
24 lines
856 B
Makefile
PDFLATEX_FLAGS:=--shell-escape --file-line-error
|
|
|
|
all: refman.pdf
|
|
|
|
pdf: refman.pdf
|
|
|
|
refman.pdf: clean refman.tex
|
|
@echo "[ GEN ] PDF LaTeX"
|
|
@pdflatex $(PDFLATEX_FLAGS) -interaction=batchmode refman > pdflatex.log
|
|
@echo "[ GEN ] LaTeX Index"
|
|
@makeindex refman.idx >> pdflatex.log 2>&1
|
|
@pdflatex $(PDFLATEX_FLAGS) -interaction=batchmode refman >> pdflatex.log
|
|
@latex_count=8 ; \
|
|
while egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\
|
|
do \
|
|
pdflatex $(PDFLATEX_FLAGS) -interaction=nonstopmode refman >> pdflatex.log ;\
|
|
latex_count=`expr $$latex_count - 1` ;\
|
|
done
|
|
@makeindex refman.idx >> pdflatex.log 2>&1
|
|
@pdflatex $(PDFLATEX_FLAGS) -interaction=nonstopmode refman >> pdflatex.log
|
|
|
|
clean:
|
|
@rm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf
|