diff options
Diffstat (limited to 'src/makefile')
-rw-r--r-- | src/makefile | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/makefile b/src/makefile deleted file mode 100644 index b637494..0000000 --- a/src/makefile +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
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 | LOZENGE = ../js/lozenge.js | ||
15 | LOZupd = ../js/update-lozenge.sh | ||
16 | |||
17 | # Do everything | ||
18 | .PHONY: all html river lozenge | ||
19 | all : html river lozenge | ||
20 | html : $(HTMLs) | ||
21 | river : $(RIVERs) | ||
22 | lozenge : $(LOZENGE) | ||
23 | |||
24 | # Generic rule for HTML targets and Markdown sources | ||
25 | %.html : %.txt | ||
26 | pandoc $< -f markdown -t html5 $(HTMopts) -o $(HTMLdir)/$@ | ||
27 | |||
28 | # Generic rule for RIVER targets and Markdown sources | ||
29 | %.river : %.txt | ||
30 | @echo River-ing $@ | ||
31 | @sed -e '/^---$$/,/^...$$/d'\ | ||
32 | -e "s/[^][A-Za-z0-9\/\"':.-]/ /g" $< |\ | ||
33 | pandoc - -f markdown -t $(LUAdir)/river.lua $(RIVopts) -o $(RIVdir)/$@ | ||
34 | |||
35 | $(LOZENGE) : $(HTMLdir)/$(HTMLs) | ||
36 | @echo "Updating lozenge.js..." | ||
37 | @list=`ls $(HTMLdir)/*.html |\ | ||
38 | sed -e 's,../,,g' |\ | ||
39 | tr '\n' ' ' |\ | ||
40 | sed -e 's/\(\S\+.html\) /"\1",/g'\ | ||
41 | -e 's/^\(.*\),$$/var files=[\1]/'` &&\ | ||
42 | sed -i "s/var files=.*/$$list/" $(LOZENGE) | ||
43 | # TODO: add compiling hapax | ||
44 | # TODO: add first line compiler | ||