about summary refs log tree commit diff stats
path: root/src/makefile
diff options
context:
space:
mode:
authorCase Duckworth2015-03-23 23:26:48 -0700
committerCase Duckworth2015-03-23 23:26:48 -0700
commit284c9020d6545b0de43d96c05e72bb6d97beb8d9 (patch)
treedc705091676ad480760320b433e3463bc514ab9d /src/makefile
parentCompile 3/19 (diff)
downloadautocento-284c9020d6545b0de43d96c05e72bb6d97beb8d9.tar.gz
autocento-284c9020d6545b0de43d96c05e72bb6d97beb8d9.zip
Add makefile (no tests yet)
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)/$@