forked from guicho271828/aaai-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
70 lines (50 loc) · 1.3 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name = default
latexmk = latexmk/latexmk.pl
sources = $(wildcard *.tex) $(wildcard *.sty) $(wildcard *.bib)
max_pages = 8
$(info $(sources))
.PHONY: all en ja open imgs clean allclean check_pages check_overflow auto \
submission archive clean-submission
all: check_pages check_overflow en
check_pages: $(name).pdf
-./check_pages.sh $(max_pages) $(name)
check_overflow: $(name).log
-./check_overflow.sh $(name).log
en: $(name).pdf supplemental.pdf
ja: $(name).ja.pdf supplemental.pdf
$(name).tex:
echo "\input{main.tex}" > $@
$(name).log $(name).fls: $(name).pdf
$(name).pdf: supplemental.pdf
%.pdf: %.tex imgs $(sources)
-$(latexmk) -pdf \
-latexoption="-halt-on-error -shell-escape" \
-bibtex \
$<
%.ja.pdf: %.tex imgs $(sources)
$(latexmk) -r latexmk/rc_ja.pl \
-latexoption="-halt-on-error -shell-escape" \
-pdfdvi \
-bibtex \
$<
ifeq ($(UNAME), Darwin)
open: $(name).pdf
open $< &>/dev/null
endif
ifeq ($(UNAME), Linux)
open: $(name).pdf
nohup xdg-open $< &>/dev/null &
endif
auto:
+./make-periodically.sh
imgs:
$(MAKE) -C img
clean: clean-submission
-rm -r *~ *.aux *.dvi *.log *.toc *.bbl \
*.blg *.utf8 *.elc $(name).pdf \
*.fdb_latexmk __* *.fls *.subm* \
_minted*
allclean: clean
$(MAKE) -C img clean
rm target
include submission.mk