diff options
author | Case Duckworth | 2015-04-04 23:58:22 -0700 |
---|---|---|
committer | Case Duckworth | 2015-04-04 23:58:22 -0700 |
commit | 529ede146afd125c76d86eb55969983af8ee21db (patch) | |
tree | f80e532dbcfade4a2dee5e3d122a5bc2d623622e /makefile | |
parent | Add backlinks to backlinks (diff) | |
download | autocento-529ede146afd125c76d86eb55969983af8ee21db.tar.gz autocento-529ede146afd125c76d86eb55969983af8ee21db.zip |
Some revision & TOC inclusion
Diffstat (limited to 'makefile')
-rw-r--r-- | makefile | 26 |
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 | |||
57 | commonTitlesOut = common-titles.html | 57 | commonTitlesOut = common-titles.html |
58 | commonTitler = $(trunk)/common-titles.sh | 58 | commonTitler = $(trunk)/common-titles.sh |
59 | commonTitlesHead = $(trunk)/common-titles.head | 59 | commonTitlesHead = $(trunk)/common-titles.head |
60 | |||
61 | tocTxt = _toc.txt | ||
62 | tocHtml = _toc.html | ||
63 | tocer = $(trunk)/toc.sh | ||
64 | tocHead = $(trunk)/toc.head | ||
65 | tocInc = $(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 |
63 | all: meta \ | 69 | all: 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 | ||
74 | distclean: clean | 80 | distclean: 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 | ||
80 | again: clean all | 86 | again: clean all |
87 | remake: distclean all | ||
81 | 88 | ||
82 | meta: $(hapaxOut) $(firstLinesOut) $(commonTitlesOut) | 89 | meta: $(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) |