-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
74 lines (56 loc) · 1.92 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
71
72
73
74
# This is the Makefile for the demonstration dissertation
# written by Martin Richards
#
# Note that continuation lines require '\'
# and that TAB is used after ':' and before unix commands.
DISS = diss.tex refs.bib propbody.tex figs/diagram.eps makefile.txt
PROP = proposal.tex propbody.tex
ALL_TEX = $(shell find data code_snippets chapters -type f) $(wilcard *.tex *.txt *.bib) figs data tikz code_snippets chapters
OUTDIR = out
help:
@echo
@echo "USAGE:"
@echo
@echo "make display help information"
@echo "make proposal"
@echo "make diss"
@echo "make linecount"
@echo "make wordcount"
@echo "make submit"
@echo "make clean remove all remakeable files"
@echo
# diss.ps: $(DISS)
LATEXMK_ARGS = -synctex=1 -interaction=nonstopmode -file-line-error -pdf --shell-escape -output-directory=$(OUTDIR) -aux-directory=$(OUTDIR)
.PHONY: diss
diss: diss.pdf
diss.pdf: diss.tex $(ALL_TEX)
sed -i 's/^\\\includeonly/% \\\includeonly/g' diss.tex
latexmk $(LATEXMK_ARGS) diss.tex
cp out/diss.pdf ar899.pdf
.PHONY: proposal
proposal: proposal.pdf
proposal.pdf: propbody.tex proposal.tex
latexmk $(LATEXMK_ARGS) proposal.tex
wordcount:
detex chapters/conclusion.tex chapters/evaluation.tex chapters/implementation.tex chapters/introduction.tex chapters/preparation.tex chapters/proforma.tex | tr -cd '0-9A-Za-z \n' | wc -w
texcount -inc -sum -1 diss.tex
linecount:
cloc --yaml `git ls-files ..` | grep 'code: ' | tail -n 1 | sed 's/ code://g'
CODE_TO_SUBMIT = $(shell echo `git ls-files ../evaluation` `git ls-files ../ppl`)
.PHONY: code
code: ar899.tar.gz
ar899.tar.gz: $(CODE_TO_SUBMIT)
echo $(CODE_TO_SUBMIT)
tar -cvzf ar899.tar.gz $(CODE_TO_SUBMIT)
.PHONY: submit
submit: diss.pdf ar899.tar.gz
cp out/diss.pdf ../ar899.pdf
cp out/diss.pdf ../ar899.pdf
cp ar899.tar.gz ../ar899.tar.gz
upload: submit
scp out/diss.pdf srcf:~/public_html
scp ar899.tar.gz srcf:~/public_html
.PHONY: clean
clean:
# echo $(OUTDIR)
rm -r out/*