-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmakefile
More file actions
33 lines (27 loc) · 1.24 KB
/
makefile
File metadata and controls
33 lines (27 loc) · 1.24 KB
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
# Copyright 2021 Nick White.
# Use of this source code is governed by the AGPLv3
# license that can be found in the LICENSE file.
all: proofreader-standalone.html
junicode.woff.base64: junicode.woff
base64 -w 0 < junicode.woff > $@
proofreader-standalone.html: junicode.woff.base64 proofreader.css proofreader.html proofreader.js
sed -n '1,/<meta/p' < proofreader.html > $@
printf '<script type="text/javascript">\n' >> $@
cat proofreader.js >> $@
printf '</script>\n' >> $@
printf '<style>\n' >> $@
printf ' @font-face { font-family: "Junicode"; src: url(data:application/x-font-woff;charset=utf-8;base64,' >> $@
cat junicode.woff.base64 >> $@
printf ') format("woff"); }\n' >> $@
sed -n '2,$$p' < proofreader.css >> $@
printf '</style>\n' >> $@
sed -n '/<\/head>/,$$p' < proofreader.html >> $@
test.html: proofreader.html
sed -n '1,/<link/p' < proofreader.html > $@
printf '<script type="text/javascript" src="test.js"></script>\n' >> $@
printf '<script type="text/javascript" src="testdata.js"></script>\n' >> $@
printf '<script type="text/javascript">window.addEventListener("load", browserstart, false)</script>\n' >> $@
sed -n '/<\/head>/,$$p' < proofreader.html >> $@
test:
cat proofreader.js testdata.js test.js | js
.PHONY: all test