about summary refs log tree commit diff stats
path: root/wip/makefile
diff options
context:
space:
mode:
authorCase Duckworth2015-04-01 23:16:18 -0700
committerCase Duckworth2015-04-01 23:20:18 -0700
commitd161be120c22faf222ec15ca618ee367e4d56575 (patch)
treeb945633e680e5682a967f63bad88a2b262b4d4c6 /wip/makefile
parentMerge branch 'gh-pages' of https://github.com/duckwork/autocento into gh-pages (diff)
downloadautocento-d161be120c22faf222ec15ca618ee367e4d56575.tar.gz
autocento-d161be120c22faf222ec15ca618ee367e4d56575.zip
Refactor makefile; Add hapax preprocessor
Diffstat (limited to 'wip/makefile')
-rw-r--r--wip/makefile48
1 files changed, 0 insertions, 48 deletions
diff --git a/wip/makefile b/wip/makefile deleted file mode 100644 index 88ff6c9..0000000 --- a/wip/makefile +++ /dev/null
@@ -1,48 +0,0 @@
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 {{{
7srcs := $(wildcard *.txt)
8trunk:= trunk
9versifyer = $(trunk)/versify.exe
10versifySrc= $(trunk)/versify.hs
11
12htmlBlackList = index.html template.html index-txt.html
13htmls = $(filter-out $(htmlBlackList),$(patsubst %.txt,%.html,$(srcs)))
14htmlTemplate = template.html
15htmlPandocOptions = --template=$(htmlTemplate)
16htmlPandocOptions+= --filter=$(versifyer)
17htmlPandocOptions+= --smart --mathml --section-divs
18
19backBlackList = "hapax.txt|first-lines.txt|common-titles.txt"
20backSrcs = $(patsubst %.html,%.back,$(htmls))
21backs = $(patsubst %.back, %_backlinks.htm,$(backSrcs))
22backHead = $(trunk)/backlink.head
23
24hapaxBlackList = first-lines.txt common-titles.txt hapax.txt
25hapaxs = $(patsubst %.txt,%.hapax,$(srcs))
26hapaxer = $(trunk)/hapax.lua
27hapaxHead = $(trunk)/hapax.head
28hapaxTemp = hapax.tmp
29hapaxOut = hapax.txt
30
31lozengeOut = $(trunk)/lozenge.js
32# }}}
33
34.PHONY: all
35all: $(versifyer) htmls backlinks
36.PHONY: htmls
37htmls: $(htmls)
38.PHONY: backlinks
39backlinks: $(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 $@