Skip to content

Commit

Permalink
Fix Rmd build tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
jcheng5 committed Apr 3, 2014
1 parent 3f6f02f commit 89f464a
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
^run\.R$
^\.gitignore$
^res$
^tools$
^man-roxygen$
^\.travis\.yml$
^staticdocs$
^R/.*\.Rmd1$
^R/.*\.html$
2 changes: 2 additions & 0 deletions .Rinstignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
^tools$
^Rmd$
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
purl = Rscript --no-restore --no-save tools/purl.R "$(1)" "$(2)"

rfiles := $(patsubst Rmd/%.Rmd,R/%.R,$(wildcard Rmd/*.Rmd))
rhtmlfiles := $(patsubst Rmd/%.Rmd,Rmd/%.html,$(wildcard Rmd/*.Rmd))
rmdfiles := $(wildcard Rmd/*.Rmd)

all: $(rfiles)

R/%.R: Rmd/%.Rmd
$(call purl,$^,$@)

clean:
rm -f $(rfiles) $(rhtmlfiles)

.PHONY: all clean
12 changes: 0 additions & 12 deletions R/Makefile

This file was deleted.

File renamed without changes.
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
all:
cd ../R && $(MAKE)
cd ../ && $(MAKE)

0 comments on commit 89f464a

Please sign in to comment.