about summary refs log tree commit diff stats
path: root/src/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/makefile')
-rw-r--r--src/makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/makefile b/src/makefile new file mode 100644 index 0000000..eefa4a3 --- /dev/null +++ b/src/makefile
@@ -0,0 +1,24 @@
1# Produce HTML & RIVER outputs with pandoc
2# Case Duckworth | autocento.me
3# inspired by Lincoln Mullen | lincolnmullen.com
4
5# Define directories, file lists, and options
6HTMLdir = ..
7RIVdir = ../river
8LUAdir = ../lua
9HTMLs := $(patsubst %.txt,%.html,$(wildcard *.txt))
10HTMopts = --template=$(HTMLdir)/.template.html
11HTMopts+= --smart --mathml --section-divs
12RIVERs := $(patsubst %.txt,%.river,$(wildcard *.txt))
13RIVopts =
14
15# Do everything
16all : $(HTMLs) $(RIVERs)
17
18# Generic rule for HTML targets and Markdown sources
19%.html : %.txt
20 pandoc $< -f markdown -t html5 $(HTMLopts) -o $(HTMLdir)/$@
21
22# Generic rule for RIVER targets and Markdown sources
23%.river : %.txt
24 pandoc $< -f markdown -t $(LUAdir)/river.lua $(RIVopts) -o $(RIVdir)/$@