forked from bcaffo/courses
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
28 lines (21 loc) · 620 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
24
25
26
27
DELAY = 1000
RMD_FILES = $(wildcard */index.Rmd)
HTML_FILES = $(patsubst %.Rmd, %.html, $(RMD_FILES))
PDF_FILES = $(patsubst %.html, %.pdf, $(HTML_FILES))
PDF_FILES2 = $(patsubst %/index.pdf, lectures/%.pdf, $(PDF_FILES))
lectures: $(PDF_FILES2)
lectures/%.pdf: %/index.pdf
cp $< $@
files:
@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 $^
#%/index.pdf: %/index.html
# casperjs makepdf.js $< $@ $(DELAY)
#%/index.html: %/index.Rmd
# cd $(dir $<) && Rscript -e "slidify::slidify('index.Rmd')" && cd ..