From 284c9020d6545b0de43d96c05e72bb6d97beb8d9 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 23 Mar 2015 23:26:48 -0700 Subject: Add makefile (no tests yet) --- src/makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/makefile (limited to 'src/makefile') diff --git a/src/makefile b/src/makefile new file mode 100644 index 0000000..eefa4a3 --- /dev/null +++ b/src/makefile @@ -0,0 +1,24 @@ +# Produce HTML & RIVER outputs with pandoc +# Case Duckworth | autocento.me +# inspired by Lincoln Mullen | lincolnmullen.com + +# Define directories, file lists, and options +HTMLdir = .. +RIVdir = ../river +LUAdir = ../lua +HTMLs := $(patsubst %.txt,%.html,$(wildcard *.txt)) +HTMopts = --template=$(HTMLdir)/.template.html +HTMopts+= --smart --mathml --section-divs +RIVERs := $(patsubst %.txt,%.river,$(wildcard *.txt)) +RIVopts = + +# Do everything +all : $(HTMLs) $(RIVERs) + +# Generic rule for HTML targets and Markdown sources +%.html : %.txt + pandoc $< -f markdown -t html5 $(HTMLopts) -o $(HTMLdir)/$@ + +# Generic rule for RIVER targets and Markdown sources +%.river : %.txt + pandoc $< -f markdown -t $(LUAdir)/river.lua $(RIVopts) -o $(RIVdir)/$@ -- cgit 1.4.1-21-gabe81