Created
June 3, 2016 15:33
-
-
Save lawrencejones/34d7bfa546903d0219c91b3e455865e3 to your computer and use it in GitHub Desktop.
Example latex Makefile with bibtex support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: clean | |
TEX_FILES:=$(shell find . -name "*.tex" -type f) | |
RESOURCE_FILES:=$(shell find ./res -type f) | |
report.pdf: $(TEX_FILES) $(RESOURCE_FILES) libtex/report.bbl | |
cd libtex && ( \ | |
pdflatex -shell-escape report \ | |
) && \ | |
mv report.pdf ../ | |
libtex/report.bbl: refs.bib | |
cd libtex && ( \ | |
pdflatex -shell-escape report && \ | |
bibtex report && \ | |
pdflatex -shell-escape report \ | |
) | |
clean: | |
rm -f report.pdf && git clean -f ./libtex | |
watch: | |
watch "make report.pdf" --wait 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment