Browse Source

makefile: added target 'knit.rmarkdown.html'

Fabian Peter Hammerle 8 years ago
parent
commit
a30b7184db
1 changed files with 5 additions and 1 deletions
  1. 5 1
      Makefile

+ 5 - 1
Makefile

@@ -1,4 +1,4 @@
-all: knit.md knit.pandoc.docx knit.pandoc.html knit.markdown.html knit.pandoc.pdf
+all: knit.md knit.pandoc.docx knit.pandoc.html knit.markdown.html knit.rmarkdown.html knit.pandoc.pdf
 
 # avoid loading dependencies defined in .RData or ~/.Rprofile
 # http://kbroman.org/knitr_knutshell/pages/reproducible.html
@@ -16,6 +16,9 @@ knit.pandoc.html : knit.md
 knit.markdown.html : knit.md
 	R ${R_OPTS} -e "library(markdown); markdownToHTML(file='$<', output='$@')"
 
+knit.rmarkdown.html : knit.md
+	R ${R_OPTS} -e "library(rmarkdown); render(input='$<', output_format='html_document', output_file='$@')"
+
 knit.pandoc.pdf : knit.md
 	pandoc --output=$@ $^
 
@@ -26,5 +29,6 @@ clean :
 	-trash knit.pandoc.docx
 	-trash knit.pandoc.html
 	-trash knit.pandoc.pdf
+	-trash knit.rmarkdown.html
 
 # https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html