forked from SeleniumHQ/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (45 loc) · 1.17 KB
/
Makefile
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
.PHONY: all clean test validate
NARRATIVE = \
intro.html \
install.html \
start.html \
wd.html \
remote.html \
best.html \
worst.html \
grid.html \
drivers.html \
java.html
FRONTMATTER = \
attr.html \
typo.html
CONTENTS = index.html quick.html $(NARRATIVE) $(FRONTMATTER)
all: AUTHORS $(CONTENTS)
clean:
rm -f AUTHORS
rm -f *.tmp*
test: validate
validate:
@for f in $(CONTENTS) ; do \
curl -s -F laxtype=yes -F parser=html5 -F level=error -F out=gnu -F doc=@$$f https://validator.nu ; \
done
gettingstarted.tmp: quick.html
./maketoc -m2 $^ > $@
narrative.tmp: $(NARRATIVE)
./maketoc -m2 $^ > $@
frontmatter.tmp: $(FRONTMATTER)
./maketoc -m2 $^ > $@
index.html: gettingstarted.tmp narrative.tmp frontmatter.tmp
./hs '#gettingstarted' @gettingstarted.tmp $@ > $@.tmp
./hs '#narrative' @narrative.tmp $@.tmp > $@.tmp2
./hs '#frontmatter' @frontmatter.tmp $@.tmp2 > $@
rm -f *.tmp*
AUTHORS:
git log --use-mailmap --format="%aN <%aE>" | sort -uf > $@
authors.tmp: AUTHORS
echo "<ul>" >> $@
git log --use-mailmap --format=" <li><a href=mailto:%aE>%aN</a>" | sort -uf >> $@
echo "</ul>" >> $@
attr.html: authors.tmp
./hs '#authors' @$< $@ > $@.tmp
mv $@.tmp $@