Created
January 14, 2014 14:51
-
-
Save ramnathv/8419468 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment