-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (37 loc) · 1.46 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
.PHONY: all clean simulations plots shiny test example example-plots example-test
TEXTDIR := text
DOC := $(TEXTDIR)/thesis.tex
RERUN := "(undefined references|Rerun to get (cross-references|the bars|point totals) right|Table widths have changed. Rerun LaTeX.|Linenumber reference failed)"
RERUNBIB := "No file.*\.bbl|Citation.*undefined"
PDFTEXOPTS := -shell-escape -output-directory $(TEXTDIR)
BIBEROPTS := --output-directory $(TEXTDIR)
MAKEINDEXOPTS := $(TEXTDIR)/thesis.nlo -s $(TEXTDIR)/nomencl.ist -o $(TEXTDIR)/thesis.nls
all: clean example-plots doc
doc: clean $(DOC:.tex=.pdf)
$(TEXTDIR)/%.pdf: $(TEXTDIR)/%.tex
pdflatex $(PDFTEXOPTS) $<
@egrep -q $(RERUNBIB) $(TEXTDIR)/$*.log && biber $(BIBEROPTS) $* && pdflatex $(PDFTEXOPTS) $<; true
makeindex $(MAKEINDEXOPTS) && pdflatex $(PDFTEXOPTS) $<; true
@egrep -q $(RERUN) $(TEXTDIR)/$*.log && pdflatex $(PDFTEXOPTS) $<; true
@egrep -q $(RERUN) $(TEXTDIR)/$*.log && pdflatex $(PDFTEXOPTS) $<; true
clean:
-rm -f $(DOC:.tex=.pdf)
-rm -f $(TEXTDIR)/*.{aux,dvi,log,bbl,blg,brf,fls,toc,thm,out,fdb_latexmk}
EXAMPLEDIR = scripts/example
example-clean:
-rm results/example/*
-rm plots/example/*
example:
$(EXAMPLEDIR)/main.r -r --nboot 1000 --nsim 100
example-plots:
$(EXAMPLEDIR)/main.r
example-test:
$(EXAMPLEDIR)/main.r -r --nboot 10 --nsim 10
simulations:
Rscript scripts/simulations.r
plots:
Rscript scripts/plots.r
shiny:
R -e 'shiny::runApp("scripts/shiny.r")'
test:
R -e 'source("claimsBoot/tests/run_tests.r")'