about summary refs log tree commit diff stats
path: root/makefile
diff options
context:
space:
mode:
authorCase Duckworth2015-04-04 23:58:22 -0700
committerCase Duckworth2015-04-04 23:58:22 -0700
commit529ede146afd125c76d86eb55969983af8ee21db (patch)
treef80e532dbcfade4a2dee5e3d122a5bc2d623622e /makefile
parentAdd backlinks to backlinks (diff)
downloadautocento-529ede146afd125c76d86eb55969983af8ee21db.tar.gz
autocento-529ede146afd125c76d86eb55969983af8ee21db.zip
Some revision & TOC inclusion
Diffstat (limited to 'makefile')
-rw-r--r--makefile26
1 files changed, 19 insertions, 7 deletions
diff --git a/makefile b/makefile index 86439e1..1c1bc7a 100644 --- a/makefile +++ b/makefile
@@ -57,9 +57,15 @@ commonTitlesTxt = common-titles.txt
57commonTitlesOut = common-titles.html 57commonTitlesOut = common-titles.html
58commonTitler = $(trunk)/common-titles.sh 58commonTitler = $(trunk)/common-titles.sh
59commonTitlesHead = $(trunk)/common-titles.head 59commonTitlesHead = $(trunk)/common-titles.head
60
61tocTxt = _toc.txt
62tocHtml = _toc.html
63tocer = $(trunk)/toc.sh
64tocHead = $(trunk)/toc.head
65tocInc = $(hapaxOut) $(islandTxt) $(firstLinesTxt) $(commonTitlesTxt) $(txts)
60# }}} 66# }}}
61# PHONY {{{ 67# PHONY {{{
62.PHONY: all clean distclean again meta 68.PHONY: all clean distclean again remake meta
63all: meta \ 69all: meta \
64 $(htmlPre) $(htmls) $(lozengeOut)\ 70 $(htmlPre) $(htmls) $(lozengeOut)\
65 $(backHtms) $(islandHtm) 71 $(backHtms) $(islandHtm)
@@ -72,14 +78,15 @@ clean:
72 -rm -f *.tmp trunk/*.tmp 78 -rm -f *.tmp trunk/*.tmp
73 79
74distclean: clean 80distclean: clean
75 -rm -f $(hapaxPre) $(htmlPre) 81 -rm -f $(hapaxPre) $(htmlPre) hapax.html
76 -rm -f $(hapaxOut) $(firstLinesOut) $(commonTitlesOut) 82 -rm -f $(hapaxOut) $(firstLinesOut) $(commonTitlesOut)
77 -rm -f $(backHtms) 83 -rm -f $(backHtms)
78 -rm -f $(htmls) 84 -rm -f $(htmls)
79 85
80again: clean all 86again: clean all
87remake: distclean all
81 88
82meta: $(hapaxOut) $(firstLinesOut) $(commonTitlesOut) 89meta: $(hapaxOut) $(firstLinesOut) $(commonTitlesOut) $(tocHtml)
83# }}} 90# }}}
84# HTML {{{ 91# HTML {{{
85$(htmlPre): $(htmlPreSrc) 92$(htmlPre): $(htmlPreSrc)
@@ -93,7 +100,7 @@ $(lozengeOut): $(htmls)
93# }}} 100# }}}
94# BACKLINKS {{{ 101# BACKLINKS {{{
95%.back: %.html $(backHead) 102%.back: %.html $(backHead)
96 @bash $(backlinker) $< $@ $(backHead) $(islandHead) $(txts) 103 @bash $(backlinker) $< $@ $(backHead) $(txts)
97 104
98%_backlinks.htm: %.back $(backHtmTemplate) 105%_backlinks.htm: %.back $(backHtmTemplate)
99 pandoc $< -t html5 $(backPandocOptions) -o $@ 106 pandoc $< -t html5 $(backPandocOptions) -o $@
@@ -101,14 +108,19 @@ $(lozengeOut): $(htmls)
101$(islandTxt): $(backTxts) 108$(islandTxt): $(backTxts)
102 109
103$(islandHtm): $(islandTxt) $(islandHead) $(backHtms) 110$(islandHtm): $(islandTxt) $(islandHead) $(backHtms)
104 pandoc $< -t html5 $(htmlPandocOptions) -o $@ 111 pandoc $(islandHead) $< -t html5 $(htmlPandocOptions) -o $@
105 rm -f $(islandTxt) 112
113$(tocTxt): $(tocInc) | $(tocead) $(tocer)
114 @bash $(tocer) $(tocTxt) $(tocInc)
115
116$(tocHtml): $(tocTxt) $(tocHead)
117 pandoc $(tocHead) $< -t html5 $(htmlPandocOptions) -o $@
106# }}} 118# }}}
107# HAPAX {{{ 119# HAPAX {{{
108$(hapaxPre): $(hapaxPreSrc) 120$(hapaxPre): $(hapaxPreSrc)
109 ghc --make $(hapaxPreSrc) 121 ghc --make $(hapaxPreSrc)
110 122
111%.hapax: %.txt $(hapaxPre) $(hapaxLinker) $(hapaxHead) 123%.hapax: %.txt $(hapaxPre) $(hapaxLinker)
112 pandoc $< -t $(hapaxer) $(hapaxPandocOptions) -o $@ 124 pandoc $< -t $(hapaxer) $(hapaxPandocOptions) -o $@
113 125
114$(hapaxOut): $(hapaxs) 126$(hapaxOut): $(hapaxs)