diff options
Diffstat (limited to 'wip/makefile')
-rw-r--r-- | wip/makefile | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/wip/makefile b/wip/makefile new file mode 100644 index 0000000..88ff6c9 --- /dev/null +++ b/wip/makefile | |||
@@ -0,0 +1,48 @@ | |||
1 | # MAKEFILE for Autocento of the breakfast table | ||
2 | # by Case Duckworth | case.duckworth@gmail.com | autocento.me | ||
3 | # inspired by Lincoln Mullen | lincolnmullen.com | ||
4 | # vim: fdm=marker | ||
5 | |||
6 | # Define variables {{{ | ||
7 | srcs := $(wildcard *.txt) | ||
8 | trunk:= trunk | ||
9 | versifyer = $(trunk)/versify.exe | ||
10 | versifySrc= $(trunk)/versify.hs | ||
11 | |||
12 | htmlBlackList = index.html template.html index-txt.html | ||
13 | htmls = $(filter-out $(htmlBlackList),$(patsubst %.txt,%.html,$(srcs))) | ||
14 | htmlTemplate = template.html | ||
15 | htmlPandocOptions = --template=$(htmlTemplate) | ||
16 | htmlPandocOptions+= --filter=$(versifyer) | ||
17 | htmlPandocOptions+= --smart --mathml --section-divs | ||
18 | |||
19 | backBlackList = "hapax.txt|first-lines.txt|common-titles.txt" | ||
20 | backSrcs = $(patsubst %.html,%.back,$(htmls)) | ||
21 | backs = $(patsubst %.back, %_backlinks.htm,$(backSrcs)) | ||
22 | backHead = $(trunk)/backlink.head | ||
23 | |||
24 | hapaxBlackList = first-lines.txt common-titles.txt hapax.txt | ||
25 | hapaxs = $(patsubst %.txt,%.hapax,$(srcs)) | ||
26 | hapaxer = $(trunk)/hapax.lua | ||
27 | hapaxHead = $(trunk)/hapax.head | ||
28 | hapaxTemp = hapax.tmp | ||
29 | hapaxOut = hapax.txt | ||
30 | |||
31 | lozengeOut = $(trunk)/lozenge.js | ||
32 | # }}} | ||
33 | |||
34 | .PHONY: all | ||
35 | all: $(versifyer) htmls backlinks | ||
36 | .PHONY: htmls | ||
37 | htmls: $(htmls) | ||
38 | .PHONY: backlinks | ||
39 | backlinks: $(backs) | ||
40 | |||
41 | $(versifyer): $(versifySrc) | ||
42 | ghc --make $(versifySrc) | ||
43 | |||
44 | %.html: %.txt template.html $(versifyer) | ||
45 | pandoc $< -f markdown -t html5 $(htmlPandocOptions) -o $@ | ||
46 | |||
47 | %_backlinks.htm: %.back | ||
48 | pandoc $< -f markdown -t html5 $(htmlPandocOptions) -o $@ | ||