-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (49 loc) · 1.19 KB
/
Makefile
File metadata and controls
60 lines (49 loc) · 1.19 KB
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
TEX = pdflatex -shell-escape -interaction nonstopmode -halt-on-error -file-line-error
CHK = chktex -shell-escape -interaction nonstopmode -halt-on-error -file-line-error
BIB = bibtex
MAIN = whitepaper
SRC = $(MAIN).tex
OUT = $(MAIN).pdf
MD = Periodically-Syncing-HyperChains
MD_SRC = $(MD).md
MD_TEX = $(MD).tex
MD_OUT = $(MD).pdf
SRCS = $(shell find . -name "*.tex")
TEXTDIR = ./
TEXT = $(shell find $(TEXTDIR) -name "*.tex")
DICT = $(TEXTDIR)/.aspell.en.pws
REPL = $(TEXTDIR)/.aspell.en.prepl
.PHONY : all clean splchk
all : $(OUT) $(MD_OUT) # check splchk
$(MD_OUT): $(MD_TEX)
$(TEX) $(MD_TEX)
$(MD_TEX): $(MD_SRC)
pandoc $(MD_SRC) -s -o $(MD_TEX)
check: $(SRCS)
! $(CHK) $(MAIN) | grep .
clean:
-rm -f *.aux
-rm -f *.log
-rm -f *.pdf
-rm -f *.toc
-rm -f *.out
-rm -f *.bbl
-rm -f *.blg
-rm -f $(MD_TEX)
$(MAIN).pdf: $(SRC)
$(TEX) $(MAIN)
$(BIB) $(MAIN)
$(TEX) $(MAIN)
$(MAIN) : $(SRCS)
$(TEX) $(SRC) && $(BIB) $(MAIN) && $(TEX) $(SRC) && $(TEX) $(SRC)
%.chk: %.tex
aspell \
--home-dir=./$(TEXTDIR) \
--personal=$(DICT) \
--repl=$(REPL) \
--lang=en_US \
--mode=tex \
--add-tex-command="autoref op" \
-x \
check $<
splchk: $(DICT) $(REPL) $(addsuffix .chk,$(basename $(TEXT)))