-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
42 lines (30 loc) · 1.12 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
RMDS=index.Rmd \
slides/introduction.Rmd \
topics/programming.Rmd \
topics/communication.Rmd \
topics/tidyverse.Rmd
HTMLS=$(patsubst %.Rmd,%.html,$(RMDS))
# Create stripped down versions of .Rmd files
RS=r-progtidy-files/programming.R \
r-progtidy-files/communication.R \
r-progtidy-files/tidyverse.R
# Create unevaluated versions (compact teacher's notes)
UNEVALS=topics/programming_uneval.html \
topics/communication_uneval.html \
topics/tidyverse_uneval.html
all : $(RS) $(HTMLS) $(UNEVALS) r-progtidy-files.zip
%.html : %.Rmd
Rscript -e 'rmarkdown::render("$<", "all")'
%_uneval.html : %.Rmd Makefile
python3 unevalify.py <$< >topics/temp.Rmd
Rscript -e 'rmarkdown::render("topics/temp.Rmd", "all")'
mv topics/temp.html $@
rm topics/temp.Rmd
r-progtidy-files/%.R : topics/%.Rmd purify.py
python3 purify.py <$< >$@
r-progtidy-files.zip : r-progtidy-files/* r-progtidy-files/fastqc-output/* $(RS)
zip -FSr r-progtidy-files.zip r-progtidy-files
clean :
rm -f $(HTMLS) $(RS) $(UNEVALS) r-progtidy-files.zip
rm -rf topics/sequences_and_features_cache
rm -rf topics/programming_cache