forked from DataScienceSpecialization/courses
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
24 lines (17 loc) · 509 Bytes
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
DELAY = 1000
RMD_FILES = $(wildcard */index.Rmd)
HTML_FILES = $(patsubst %.Rmd, %.html, $(RMD_FILES))
PDF_FILES = $(patsubst %/index.html, lectures/%.pdf, $(HTML_FILES))
listfiles:
@echo $(RMD_FILES)
@echo $(HTML_FILES)
@echo $(PDF_FILES)
html: $(HTML_FILES)
pdf: $(PDF_FILES)
all: html pdf
zip: $(PDF_FILES)
zip all_pdf_files.zip $^
lectures/%.pdf: %/index.html
casperjs makepdf.js $< $@ $(DELAY)
%/index.html: %/index.Rmd
cd $(dir $<) && Rscript -e "slidify::slidify('index.Rmd')" && cd ..