summary refs log tree commit diff stats
path: root/src/makefile
blob: 800f8a05ced959d3d305fb7e93f6437cae1177fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# 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 $(HTMopts) -o $(HTMLdir)/$@

# Generic rule for RIVER targets and Markdown sources
%.river : %.txt
	pandoc $< -f markdown -t $(LUAdir)/river.lua $(RIVopts) -o $(RIVdir)/$@

# TODO: add lozenge updating
# 	AND compiling hapax