Skip to content

Instantly share code, notes, and snippets.

@TobleMiner
Created October 9, 2019 20:05
Show Gist options
  • Save TobleMiner/8795bd37b7e150f6a799503f0b987b81 to your computer and use it in GitHub Desktop.
Save TobleMiner/8795bd37b7e150f6a799503f0b987b81 to your computer and use it in GitHub Desktop.
Simple pdflatex makefile
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