forked from adventuregamestudio/ags-manual
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
188 lines (171 loc) · 5.3 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
websitedir = $(pkgdatadir)/website
websitecssdir = $(pkgdatadir)/website/css
websitefontsdir = $(pkgdatadir)/website/fonts
websiteimagesdir = $(pkgdatadir)/website/images
websitejsdir = $(pkgdatadir)/website/js
websitestaticdir = $(pkgdatadir)/website/static
website_DATA = $(HTML_FILES) $(srcdir)/html/jslicensing.html genindex.html
websitecss_DATA = $(srcdir)/html/css/main.css $(srcdir)/vendor/normalize.css
websitefonts_DATA = \
$(srcdir)/vendor/open-sans-v17-latin/open-sans-v17-latin-regular.eot \
$(srcdir)/vendor/open-sans-v17-latin/open-sans-v17-latin-regular.svg \
$(srcdir)/vendor/open-sans-v17-latin/open-sans-v17-latin-regular.ttf \
$(srcdir)/vendor/open-sans-v17-latin/open-sans-v17-latin-regular.woff \
$(srcdir)/vendor/open-sans-v17-latin/open-sans-v17-latin-regular.woff2
websiteimages_DATA = $(IMAGE_FILES)
websitejs_DATA = \
$(srcdir)/html/js/darkmode.js \
$(srcdir)/vendor/mark.js \
$(srcdir)/vendor/mark.min.js \
search.js
websitestatic_DATA = $(srcdir)/html/static/favicon.ico
if BUILD_CHM
pkgdata_DATA = source/ags-help.chm
endif
CLEANFILES = \
$(HTML_FILES) \
$(HTM_FILES) \
$(METADATA_FILES) \
$(pkgdata_DATA) \
genindex.html \
metadata.lua \
search.js \
source/ags-help.hhc \
source/ags-help.hhk \
source/ags-help.hhp
EXTRA_DIST = \
$(IMAGE_FILES) \
$(TOP_FILES) \
$(srcdir)/html/js/darkmode.js \
$(srcdir)/html/jslicensing.html \
$(srcdir)/html/template.html5 \
$(srcdir)/html/template.js \
$(srcdir)/htmlhelp/template.hhc \
$(srcdir)/htmlhelp/template.hhp \
$(srcdir)/htmlhelp/template.html4 \
$(srcdir)/lua/agsman.lua \
$(srcdir)/lua/insert_anchors.lua \
$(srcdir)/lua/insert_toc.lua \
$(srcdir)/lua/metacheck.lua \
$(srcdir)/lua/rewrite_links.lua \
$(srcdir)/lua/set_title.lua \
$(srcdir)/lua/write_feature_check.lua \
$(srcdir)/lua/write_genindex.lua \
$(srcdir)/lua/write_hhc.lua \
$(srcdir)/lua/write_hhk.lua \
$(srcdir)/lua/write_hhp.lua \
$(srcdir)/lua/write_metablock.lua \
$(srcdir)/lua/write_metajs.lua \
$(srcdir)/meta/approved_links.txt \
$(srcdir)/syntax/ags.xml \
$(srcdir)/syntax/agsdialog.xml \
$(srcdir)/vendor/mark.js \
$(srcdir)/vendor/mark.min.js \
$(websitecss_DATA) \
$(websitefonts_DATA) \
$(websitestatic_DATA)
SUFFIXES: .htm .html .lua .md
.md.lua:
$(AM_V_GEN)"$(PANDOC)" --from gfm-tex_math_dollars \
--to "$(srcdir)/lua/write_metablock.lua" \
--lua-filter "$(srcdir)/lua/set_title.lua" \
--metadata docname=$(*F) \
--eol lf \
--output $@ \
$<
metadata.lua: $(METADATA_FILES)
$(AM_V_GEN)(printf 'return { pages = {\n'; \
cat $(METADATA_FILES); \
printf '}}\n') > [email protected] && mv [email protected] $@
.md.html:
$(AM_V_GEN)"$(PANDOC)" --from gfm-tex_math_dollars \
--to html5 \
--metadata title=$(*F) \
--lua-filter "$(srcdir)/lua/set_title.lua" \
--lua-filter "$(srcdir)/lua/rewrite_links.lua" \
--lua-filter "$(srcdir)/lua/insert_anchors.lua" \
--template "$(srcdir)/html/template.html5" \
--variable footer="$(FOOTER)" \
--table-of-contents \
--section-divs \
--css "css/normalize.css" \
--css "css/main.css" \
--syntax-definition="$(srcdir)/syntax/ags.xml" \
--syntax-definition="$(srcdir)/syntax/agsdialog.xml" \
--eol lf \
--wrap=none \
--output $@ \
$<
genindex.html: metadata.lua
$(AM_V_GEN)echo | "$(PANDOC)" \
--to "$(srcdir)/lua/write_genindex.lua" \
--template "$(srcdir)/html/template.html5" \
--variable footer="$(FOOTER)" \
--css "css/normalize.css" \
--css "css/main.css" \
--eol lf \
--wrap=none \
--output $@
search.js: metadata.lua
$(AM_V_GEN)echo | "$(PANDOC)" \
--to "$(srcdir)/lua/write_metajs.lua" \
--template "$(srcdir)/html/template.js" \
--eol lf \
--output $@
.md.htm:
$(AM_V_GEN)"$(PANDOC)" --from gfm-tex_math_dollars \
--to html4 \
--metadata title=$(*F) \
--lua-filter "$(srcdir)/lua/set_title.lua" \
--lua-filter "$(srcdir)/lua/rewrite_links.lua" \
--lua-filter "$(srcdir)/lua/insert_toc.lua" \
--template "$(srcdir)/htmlhelp/template.html4" \
--eol crlf \
--wrap=none \
--output $@ \
$<
source/index.htm: source/index.md
$(AM_V_GEN)"$(PANDOC)" --from gfm-tex_math_dollars \
--to html4 \
--metadata title=$(*F) \
--lua-filter "$(srcdir)/lua/set_title.lua" \
--lua-filter "$(srcdir)/lua/rewrite_links.lua" \
--template "$(srcdir)/htmlhelp/template.html4" \
--eol crlf \
--wrap=none \
--output $@ \
$<
source/ags-help.hhk: metadata.lua
$(AM_V_GEN)echo | "$(PANDOC)" \
--to "$(srcdir)/lua/write_hhk.lua" \
--eol crlf \
--output $@
source/ags-help.hhc:
$(AM_V_GEN)"$(PANDOC)" --from gfm-tex_math_dollars \
--to "$(srcdir)/lua/write_hhc.lua" \
--lua-filter "$(srcdir)/lua/rewrite_links.lua" \
--template "$(srcdir)/htmlhelp/template.hhc" \
--eol crlf \
--wrap=none \
--output $@ \
source/index.md
source/ags-help.hhp:
$(AM_V_GEN)echo | "$(PANDOC)" \
--to "$(srcdir)/lua/write_hhp.lua" \
--metadata incfiles="$(HHP_FILES)" \
--variable projectname=ags-help \
--variable index=index.htm \
--template "$(srcdir)/htmlhelp/template.hhp" \
--eol crlf \
--output $@
source/ags-help.chm: $(HTM_FILES) source/ags-help.hhk source/ags-help.hhc source/ags-help.hhp
if BUILD_CHM_WITH_HHC
$(AM_V_GEN)"$(HHC)" source/ags-help.hhp || exit 0; exit 1
endif
if BUILD_CHM_WITH_CHMCMD
$(AM_V_GEN)cd source && "$(CHMCMD)" ags-help.hhp
endif
check: metadata.lua
$(AM_V_at)"$(PANDOC)" lua \
"$(srcdir)/lua/metacheck.lua" \
"$(srcdir)/meta/approved_links.txt"