Fix Rmd build tooling

This commit is contained in:
Joe Cheng
2014-04-03 15:31:44 -07:00
parent 3f6f02f7d2
commit 89f464af99
6 changed files with 20 additions and 14 deletions

View File

@@ -7,7 +7,8 @@
^run\.R$
^\.gitignore$
^res$
^tools$
^man-roxygen$
^\.travis\.yml$
^staticdocs$
^R/.*\.Rmd1$
^R/.*\.html$

2
.Rinstignore Normal file
View File

@@ -0,0 +1,2 @@
^tools$
^Rmd$

15
Makefile Normal file
View File

@@ -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

View File

@@ -1,12 +0,0 @@
purl = Rscript --no-restore --no-save ../tools/purl.R "$(1)" "$(2)"
rfiles := $(patsubst %.Rmd,%.R,$(wildcard *.Rmd))
rmdfiles := $(wildcard *.Rmd)
all: $(rfiles)
%.R: %.Rmd
$(call purl,$^,$@)
clean:
rm -f $(rfiles)

View File

@@ -1,2 +1,2 @@
all:
cd ../R && $(MAKE)
cd ../ && $(MAKE)