-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (24 loc) · 875 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
PRJ = sample-sigconf
# Small cheat to allow synchronization between PDF and .tex for supported editors (run `make S=1`)
ifdef S
EXTRA = -synctex=1
endif
PYTHON3 := $(shell type -P python3 || echo "")
ifeq ($(PYTHON3),)
BUILD = pdflatex ${EXTRA} $< && (ls *.aux | xargs -n 1 bibtex) || pdflatex ${EXTRA} $< || pdflatex ${EXTRA} $<
else
BUILD = python3 .build/latexrun.py -O . --latex-args="${EXTRA}" $<
endif
SOURCES=$(shell find . -name '*.tex' -or -name '*.bib' -or -name '*.sty')
IMAGES=$(shell find figures -name '*.pdf')
all: $(addsuffix .pdf,${PRJ})
%.pdf: %.tex ${SOURCES} ${IMAGES}
${BUILD}
view: $(addsuffix .view,${PRJ})
%.view: %.pdf
open $< &
.PHONY: figures
figures:
make -C figures
clean:
/bin/rm -rf *.toc *.aux $(addsuffix .bbl,${PRJ}) *.blg *.log *~* *.bak *.out $(addsuffix .pdf,${PRJ}) cut.sh .latexrun.db* *.fls *.rel _region_.* *.synctex.gz