-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
140 lines (114 loc) · 4.05 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
TMPL = pandoc_custom/templates/revealjs.template
CSL = pandoc_custom/csl/elsevier-harvard.csl
# output files, file stem
FILES = assetMgmt.slides.html assetMgmt.pdf dynAssetAlloc.slides.html dynAssetAlloc.pdf
OUTDIR = output
# speficy default target
CURRENT_TARGET = $(OUTDIR)/dynAssetAlloc
current: $(CURRENT_TARGET).slides.html
reveal: $(CURRENT_TARGET).slides.html
pdf: $(CURRENT_TARGET).pdf
# target to build all formats for current target
all: $(OUTDIR)/assetMgmt.slides.html $(OUTDIR)/assetMgmt.pdf $(OUTDIR)/pkgAssetMgmt.slides.html
# target to build all files
OUT := $(addprefix $(OUTDIR)/,$(FILES))
everything: $(OUT)
debug: $(CURRENT_TARGET).tex
#########################################
## dynamic asset allocation strategies ##
#########################################
$(OUTDIR)/dynAssetAlloc.slides.html: slide_srcs/dynAssetAlloc.md Makefile refs.bib
pandoc --template=$(TMPL) \
--slide-level=3 \
--mathjax \
--variable theme="black" \
-V slideNumber=true \
--include-in-header=pandoc_custom/css/reveal_left_strong.css \
-s -V revealjs-url=../reveal.js -t revealjs -f markdown \
--filter pandoc-citeproc --csl=$(CSL) \
--bibliography=refs.bib \
-o $@ $<
# -V transition=none \
# --filter pandoc_custom/filters/adaptHeaders.hs \
# --filter pandoc_custom/filters/amsmath.hs \
$(OUTDIR)/dynAssetAlloc.pdf: slide_srcs/dynAssetAlloc.md Makefile refs.bib
pandoc -s -t beamer -f markdown \
--slide-level=3 \
-V theme=CambridgeUS -V colortheme=dolphin \
--mathjax \
--filter pandoc_custom/filters/skip_pause.hs \
--filter pandoc-citeproc --csl=pandoc_custom/csl/elsevier-harvard.csl \
--bibliography=refs.bib \
-o $@ $<
# -V theme=Frankfurt -V colortheme=default \
$(OUTDIR)/dynAssetAlloc.tex: slide_srcs/dynAssetAlloc.md Makefile refs.bib
pandoc -s -t beamer -f markdown \
-V theme=CambridgeUS -V colortheme=dolphin \
--mathjax \
--filter pandoc_custom/filters/skip_pause.hs \
--filter pandoc-citeproc --csl=pandoc_custom/csl/elsevier-harvard.csl \
--bibliography=refs.bib \
-o $@ $<
###############
## assetMgmt ##
###############
$(OUTDIR)/assetMgmt.slides.html: slide_srcs/assetMgmt.md Makefile refs.bib
pandoc --template=$(TMPL) \
--slide-level=3 \
--filter pandoc_custom/filters/adaptHeaders.hs \
--filter pandoc_custom/filters/amsmath.hs \
--variable theme="black" \
-V slideNumber=true \
--include-in-header=pandoc_custom/css/reveal_left_strong.css \
-s -V revealjs-url=../reveal.js -t revealjs -f markdown \
--filter pandoc-citeproc --csl=$(CSL) \
--bibliography=refs.bib \
-o $@ $<
# -V transition=none \
$(OUTDIR)/assetMgmt.pdf: slide_srcs/assetMgmt.md Makefile refs.bib
pandoc -s -t beamer -f markdown \
--slide-level=3 \
-V theme=CambridgeUS -V colortheme=dolphin \
--mathjax \
--filter pandoc_custom/filters/skip_pause.hs \
--filter pandoc-citeproc --csl=pandoc_custom/csl/elsevier-harvard.csl \
--bibliography=refs.bib \
-o $@ $<
# -V theme=Frankfurt -V colortheme=default \
$(OUTDIR)/assetMgmt.tex: slide_srcs/assetMgmt.md Makefile refs.bib
pandoc -s -t beamer -f markdown \
-V theme=CambridgeUS -V colortheme=dolphin \
--mathjax \
--filter pandoc_custom/filters/skip_pause.hs \
--filter pandoc-citeproc --csl=pandoc_custom/csl/elsevier-harvard.csl \
--bibliography=refs.bib \
-o $@ $<
#####################
## Julia AssetMgmt ##
#####################
$(OUTDIR)/pkgAssetMgmt.slides.html: slide_srcs/pkgAssetMgmt.md Makefile
pandoc --template=$(TMPL) \
--slide-level=3 --toc --toc-depth=1 \
--filter pandoc_custom/filters/adaptHeaders.hs \
--filter pandoc_custom/filters/amsmath.hs \
--variable theme="black" \
-V slideNumber=true \
--include-in-header=pandoc_custom/css/reveal_left_strong.css \
-s -V revealjs-url=../reveal.js -t revealjs -f markdown \
-o $@ $<
################
## publishing ##
################
publish: $(OUT) Makefile refs.bib
git checkout gh-pages
git checkout master output/assetMgmt.slides.html
git commit -m "asset management slides updated"
git push origin gh-pages
git checkout master
# TODO: push files to ftp server
clean:
rm -f $(OUTDIR)/*.slides.html \
rm -f $(OUTDIR)/*.pdf
again:
make clean
make