Ok so I want to make a makefile that will find all .Rmd files and convert them to html files. I have a make file the works but I want to work loop through the .Rmd and then .md files. Here is what I have so far:
Any help making this more efficient would be great!!
Code:
# test comment
all: Day1Part1-Introduction.md Day1Part1-Introduction.html \
Day1Part1-session2.md Day1Part1-session2.html
Day1Part1-Introduction.md: Day1Part1-Introduction.Rmd
/usr/bin/Rscript -e "knitr::knit('Day1Part1-Introduction.Rmd', 'Day1Part1-Introduction.md')"
Day1Part1-Introduction.html: Day1Part1-Introduction.md
pandoc -s -t slidy Day1Part1-Introduction.md -o Day1Part1-Introduction.html
Day1Part1-session2.md: Day1Part1-session2.Rmd
/usr/bin/Rscript -e "knitr::knit('Day1Part1-session2.Rmd', 'Day1Part1-session2.md')"
Day1Part1-session2.html: Day1Part1-session2.md
pandoc -s -t slidy Day1Part1-session2.md -o Day1Part1-session2.html
clean:
rm -rf *.md figure *.inp