forked from STAT545-UBC/STAT545-UBC-original-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (38 loc) · 1.22 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
all: syllabus.html \
topics.html \
cm105_pipelines.html \
cm106_pipelines.html \
automation00_index.html \
automation01_slides/index.html \
automation02_windows.html \
automation03_make-test-drive.html \
automation04_make-activity.html \
automation10_holding-area/01_automation-example_just-r/index.html \
automation10_holding-area/02_automation-example_r-and-make/index.html \
automation10_holding-area/03_automation-example_render-without-rstudio/index.html \
hw09_automation.html
install-deps:
brew install graphviz
.PHONY: all
.DELETE_ON_ERROR:
.SECONDARY:
# Patterns
%.html: %.Rmd
Rscript -e 'rmarkdown::render("$<")'
%.html: %.md
Rscript -e 'rmarkdown::render("$<")'
%/index.html: %/slides.revealjs %/slides.md
pandoc -pst revealjs -V theme:sky -o $@ --template $^
%/index.html: %/README.md
Rscript -e 'rmarkdown::render("$<", "html_document", "index.html")'
# Render a PNG from a GraphViz file
%.png: %.gv
dot -Tpng $< >$@
# Create a GraphViz file from this Makefile
Makefile.gv: Makefile
$(MAKE) -Bnd all |make2graph >$@
# Create a GraphViz file from a Makefile
%/Makefile.gv: %/Makefile
$(MAKE) -C $* -Bnd all |make2graph >$@
# Dependencies
block023_pipelines.html: block023_pipelines/images/activity.png