/
Makefile
236 lines (155 loc) · 5.33 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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# QMEE
# https://mac-theobio.github.io/QMEE/?version=122
### Hooks for the editor to set the default target
current: target
-include target.mk
vim_session:
bash -cl "vmt index.md rweb.mk"
##################################################################
Sources += $(wildcard docs/*.html) $(wildcard docs/*/*.html)
Sources += $(wildcard html/*.*)
######################################################################
## Root content
## docs/index.html: index.md
## current.md is for stashing stuff that's not current now, but was current before
Sources += index.md current.md
Ignore += index.html
docs/index.html: index.md
pandoc $< -o $@ --mathjax -s -B html/mainheader.html -A html/mainfooter.html --css html/qmee.css --embed-resources --standalone
## Try suppressing rweb in main directory 2021 Jan 21 (Thu)
Sources += rweb.mk
## -include rweb.mk
######################################################################
## Manual visualizations
## Not clear why we have wildcards here
lectures/subdocs/%.html: $(wildcard lectures/*.rmd)
cd lectures && $(MAKE) subdocs/$*.html
tips/subdocs/%.html: $(wildcard tips/*.rmd)
cd tips && $(MAKE) subdocs/$*.html
assignments/subdocs/%.html: $(wildcard assignments/*.md)
cd assignments && $(MAKE) subdocs/$*.html
topics/subdocs/%.html: $(wildcard topics/*.md)
cd topics && $(MAKE) subdocs/$*.html
## lectures/subdocs/Mixed_models_intro.slides.html: lectures/Mixed_models_intro.rmd
## lectures/subdocs/Simulations.notes.html: lectures/Simulations.rmd
## lectures/subdocs/Permutations.slides.html: lectures/Permutations.rmd
## tips/subdocs/R_style.notes.html: tips/R_style.rmd
######################################################################
## Main update
update: docs/index.html data/index.html
## Subdirectories
%.update:
cd $* && $(MAKE) update
subdirs += admin topics
subdirs += lectures tips assignments
######################################################################
Ignore += $(subdirs)
alldirs += $(subdirs)
update_all: $(subdirs:%=%.update) update
local_site: update_all
$(MAKE) docs/index.html.go
old_site: gh-pages
$(MAKE) gh-pages/index.html.go
push_all: update_all
$(MAKE) all.time
dateup:
touch docs/*.html docs/*/*.html
syncup: update_all pull dateup all.time
######################################################################
## Data index
## data/ lives in docs/ so that it's part of the pages
Makefile: | data code
Ignore += data
data: dir=docs
data:
$(linkdir)
Sources += $(wildcard docs/data/*.*)
Sources += $(wildcard *.pl)
Sources += data.md
Ignore += data_index.md
## Edit data.md page; it's also supposed to edit itself
## To mark MISSING files and append UNTRACKED ones
data.md: $(wildcard data/*.*sv data/*.rd* data/*.RData)
$(touch)
## Don't edit (might be read-only to remind you)
data_index.md: data.md dataindex.pl
- $(MAKE) data data.filemerge
$(PUSHRO)
## data/index.html: data.md
## data_index.md: data.md
data/index.html: data_index.md
pandoc $< -o $@ --mathjax -s -f gfm -B html/header.html -A html/footer.html --css html/qmee.css --embed-resources --standalone
######################################################################
## code is on the front side now (like data) 2021 Mar 19 (Fri)
Ignore += code
code: dir=docs
code:
$(linkdir)
Sources += $(wildcard docs/code/*.*)
######################################################################
projects.Rout: code/projects.R
$(pipeR)
sims.Rout: code/sims.R
$(pipeR)
tidyMRE.Rout: code/tidyMRE.R
$(pipeR)
australia.Rout: code/australia.R
$(pipeR)
parademo_clean.Rout: code/parademo_clean.R
$(pipeR)
village_clean.Rout: code/village_clean.R
$(pipeR)
cars.Rout: code/cars.R
$(pipeR)
######################################################################
homRead.Rout: code/homRead.R
$(pipeR)
homMerge.Rout: code/homMerge.R homRead.Rout
$(pipeR)
homScatter.Rout: code/homScatter.R homMerge.Rout
$(pipeR)
homBox.Rout: code/homBox.R homMerge.Rout
$(pipeR)
## Crib page; some usable stuff but not very different from the rmd
## code/homDump.R
######################################################################
## Push Dworkin code
## docs/code/Contrasts.lecture.R: lectures/Contrasts.rmd
docs/code/%.lecture.R: lectures/%.rmd
R --vanilla -e 'library("knitr"); knit("$<", output="$@", tangle=TRUE)'
Contrast_test.Rout: code/Contrast_test.R
$(pipeR)
## Dushoff lectures that live elsewhere
Ignore += docs/legacy
######################################################################
## Old content
## git mv source stuff from oldSource to where it's wanted
## arcScript: ; git mv $(oldscripts) oldSource ##
## Look around, or emergency rescue
Ignore += gh-pages
gh-pages:
$(MAKE) $@.branchdir
##################################################################
## A partial, automatic list of deleted files
Sources += germ.md
## A bunch of confusing rmd rules
Sources += pages.mk
## Live sessions
Sources += live.mk
## Weird stuff
Sources += orphans.mk
######################################################################
### Makestuff
Sources += Makefile README.md notes.txt
## TODO.md moved to private repo
msrepo = https://github.com/dushoff
ms = makestuff
-include makestuff/perl.def
Ignore += makestuff
Makefile: makestuff/Makefile
makestuff/Makefile:
git clone $(msrepo)/makestuff
-include makestuff/os.mk
-include makestuff/pipeR.mk
-include makestuff/git.mk
-include makestuff/visual.mk