diff options
Diffstat (limited to 'src/makefile')
-rw-r--r-- | src/makefile | 24 |
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 | ||
6 | HTMLdir = .. | ||
7 | RIVdir = ../river | ||
8 | LUAdir = ../lua | ||
9 | HTMLs := $(patsubst %.txt,%.html,$(wildcard *.txt)) | ||
10 | HTMopts = --template=$(HTMLdir)/.template.html | ||
11 | HTMopts+= --smart --mathml --section-divs | ||
12 | RIVERs := $(patsubst %.txt,%.river,$(wildcard *.txt)) | ||
13 | RIVopts = | ||
14 | |||
15 | # Do everything | ||
16 | all : $(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)/$@ | ||