diff options
author | Case Duckworth | 2015-03-23 23:26:48 -0700 |
---|---|---|
committer | Case Duckworth | 2015-03-23 23:26:48 -0700 |
commit | 284c9020d6545b0de43d96c05e72bb6d97beb8d9 (patch) | |
tree | dc705091676ad480760320b433e3463bc514ab9d /src/makefile | |
parent | Compile 3/19 (diff) | |
download | autocento-284c9020d6545b0de43d96c05e72bb6d97beb8d9.tar.gz autocento-284c9020d6545b0de43d96c05e72bb6d97beb8d9.zip |
Add makefile (no tests yet)
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)/$@ | ||