Skip to content

Commit

Permalink
changes lesson-rmd target to lesson-md with new recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Carroll committed Dec 31, 2016
1 parent 4030b74 commit 8fb905e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@ DST=_site

# Controls
.PHONY : commands clean files
.NOTPARALLEL:
all : commands

## commands : show all commands.
commands :
@grep -h -E '^##' ${MAKEFILES} | sed -e 's/## //g'

## serve : run a local server.
serve : lesson-rmd
serve : lesson-md
${JEKYLL} serve

## site : build files but do not run a server.
site : lesson-rmd
site : lesson-md
${JEKYLL} build

# repo-check : check repository settings.
Expand Down Expand Up @@ -53,7 +54,7 @@ workshop-check :
## ----------------------------------------
## Commands specific to lesson websites.

.PHONY : lesson-check lesson-rmd lesson-files lesson-fixme
.PHONY : lesson-check lesson-md lesson-files lesson-fixme

# RMarkdown files
RMD_SRC = $(wildcard _episodes_rmd/??-*.Rmd)
Expand All @@ -79,9 +80,12 @@ HTML_DST = \
$(patsubst _extras/%.md,${DST}/%/index.html,$(wildcard _extras/*.md)) \
${DST}/license/index.html

## lesson-rmd : convert Rmarkdown files to markdown
lesson-rmd: $(RMD_SRC)
@bin/knit_lessons.sh $(RMD_SRC)
## lesson-md : convert Rmarkdown files to markdown
lesson-md : ${RMD_DST}

# Use of .NOTPARALLEL makes rule execute only once
${RMD_DST} : ${RMD_SRC}
@bin/knit_lessons.sh ${RMD_SRC}

## lesson-check : validate lesson Markdown.
lesson-check :
Expand Down

0 comments on commit 8fb905e

Please sign in to comment.