Created
October 9, 2019 20:05
-
-
Save TobleMiner/8795bd37b7e150f6a799503f0b987b81 to your computer and use it in GitHub Desktop.
Simple pdflatex makefile
This file contains 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
PAPER := bittorrent | |
SOURCES := Makefile IEEEtran.cls IEEEabrv.bib references.bib | |
GENERATED := $(PAPER).pdf $(PAPER).aux $(PAPER).bbl $(PAPER).log | |
RM ?= rm -f | |
%.pdf : %.tex %.bbl | |
while true; do \ | |
out=$$(pdflatex $< 2>&1); \ | |
echo "$$out"; \ | |
grep 'may have changed' <<< "$$out" || break; \ | |
done | |
%.aux : %.tex | |
pdflatex $< | |
%.bbl: %.aux | |
bibtex $< | |
all: $(PAPER).pdf | |
$(PAPER).pdf: $(SOURCES) $(PAPER).bbl | |
$(PAPER).bbl: $(PAPER).aux | |
clean: | |
$(RM) $(GENERATED) | |
.PHONY: all clean |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment