Skip to content

Instantly share code, notes, and snippets.

@gvillalta99
Created April 29, 2015 22:38
Show Gist options
  • Save gvillalta99/90bce8a2a940e8b2ce60 to your computer and use it in GitHub Desktop.
Save gvillalta99/90bce8a2a940e8b2ce60 to your computer and use it in GitHub Desktop.
Make *.pdf from *.tex
PDF=pdflatex
IDX=makeindex
BIB=bibtex
READ=evince
MAKE=make clean-clutter
%.pdf: %.tex %.idx
@echo 'Building $@ dependencies $?'
$(IDX) $(@:.pdf=.idx)
$(BIB) $(@:.pdf= )
$(PDF) $(@:.pdf=.tex)
$(PDF) $(@:.pdf=.tex)
$(READ) $@ &
$(MAKE)
%.idx:
$(PDF) $(@:.idx=.tex)
clean-clutter:
rm -f *.aux *.bbl *.blg *.brf *.dvi *.idx *.ilg *.ind *.log *.out.ps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment