edward

An extensible POSIX-compatible implementation of the ed(1) text editor

git clone https://git.8pit.net/edward.git

 1# Can be set to an URL for any classless CSS framework.
 2STYLESHEET ?= https://cdn.jsdelivr.net/gh/kognise/water.css@latest/dist/dark.css
 3
 4DISCOUNT = discount-theme
 5DISCOUNT_FLAGS = -c +header,+idanchor
 6
 7SCMDOC = scmdoc
 8SCMDOC_FLAGS = -s style.css
 9
10SCMDOC_FILES = edward.ed.editor.html \
11	edward.ed.cmd.html \
12	edward.ed.addr.html \
13	edward.ed.posix.html \
14	edward.cli.html \
15	edward.util.html \
16	edward.parse.html \
17	edward.replace.html \
18	edward.buffer.html
19
20all: index.html style.css $(SCMDOC_FILES)
21clean:
22	$(RM) index.html style.css $(SCMDOC_FILES)
23style.css:
24	curl -sLo style.css $(STYLESHEET)
25index.html: index.md page.theme
26	$(DISCOUNT) $(DISCOUNT_FLAGS) -o $@ $<
27
28edward.%.html: %.sld
29	$(SCMDOC) $(SCMDOC_FLAGS) $<
30edward.ed.%.html: ed/%.sld
31	$(SCMDOC) $(SCMDOC_FLAGS) $<
32
33# XXX: This essentially duplicates the dependency tracking of edward.egg.
34edward.ed.editor.html: ed/editor.sld ed/editor.scm
35edward.ed.cmd.html: ed/cmd.sld ed/cmd.scm
36edward.ed.addr.html: ed/addr.sld ed/addr.scm
37edward.ed.posix.html: ed/posix.sld ed/posix.scm
38edward.cli.html: cli.sld cli.scm
39edward.util.html: util.sld util.scm
40edward.replace.html: replace.sld replace.scm
41edward.parse.html: parse.sld parse/parse.scm parse/repl.scm parse/util.scm
42edward.buffer.html: buffer.sld buffer/buffer.scm buffer/stack.scm
43
44deploy: index.html style.css $(SCMDOC_FILES)
45	rsync $^ magnesium:/var/www/htdocs/files.8pit.net/edward/latest/doc
46
47VPATH = ../lib
48.PHONY: all clean deploy