blob: 5f62802ea92046b9da1e1d7e796d15be8a5709ce (
plain) (
blame)
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
|
.POSIX:
.SUFFIXES:
.SUFFIXES: .in .md .html
.in:
sed \
-e "s:@DOMAIN@:`cat aux/domain.txt`:g" \
-e "s:@NAME@:`basename "$$PWD"`:g" \
-e 's:@MAILING_LIST@:$(MAILING_LIST):g' \
< $< > $@
.in.html:
pandoc -s -r man -w html \
-H aux/headers.html \
--metadata lang="`echo $< | awk -F. '{ print $$(NF-2) }'`" \
< $(<D)/`basename "$(<F)" .in` > $@
.md.html:
pandoc -s -r commonmark -w html \
-H aux/headers.html \
--metadata lang="`echo $(<F) | cut -d. -f2`" \
--metadata title="`basename "$$PWD"` - `echo $(<F) | cut -d. -f1`" \
--toc --toc-depth=2 \
--highlight-style pygments \
< $< > $@
manpages.html = $(manpages.in:.in=.html)
md_files.html = $(md_files:.md=.html)
public: manpages.sentinel public/makefile.svg md.sentinel public/index.html \
public/ci public/TODOs.html public/style.css public/favicon.svg
touch $@
public/index.html:
mkdir -p $(@D)
ln -rs public/en/index.html $@
public/ci:
sh aux/ci/report.sh -n "`basename "$$PWD"`" -o $@
public/TODOs.html: TODOs.md aux/preamble-md
mkdir -p $(@D)
td -H | cat aux/preamble-md - | pandoc -s -r commonmark -w html \
-H aux/headers.html \
--metadata lang=en \
--metadata title="`basename "$$PWD"` - TODOs" \
--toc --toc-depth=2 \
--highlight-style pygments \
> $@
public/favicon.svg: aux/favicon.svg
mkdir -p $(@D)
cp aux/favicon.svg $@
public/style.css:
mkdir -p $(@D)
td -S > $@
md.sentinel: $(md_files.html)
mkdir -p public
sh aux/ext2subdir.sh -o public $?
for d in public/*/; do ln -rfs public/style.css $$d/style.css; done
touch $@
manpages.sentinel: $(manpages.html)
mkdir -p public
sh aux/ext2subdir.sh -o public $?
touch $@
public/makefile.svg: Makefile
mkdir -p $(@D)
LANG=en.UTF-8 make -Bnd dev | make2graph | dot -Tsvg >$@
index.en.md:
ln -s README.md $@
CHANGELOG.en.md:
ln -s CHANGELOG.md $@
all_en_files = \
$(en_files) \
index.en.md \
CHANGELOG.en.md
po/po4a.cfg: $(all_en_files) po
sh aux/po4a-cfg.sh -f '$(all_en_files) aux/checks/manpages/footer.en.0.in' > $@
po4a $@
test-files = \
aux/checks/changelog.sh \
aux/checks/manpages.sh \
aux/checks/readme.sh \
aux/checks/shellcheck.sh \
aux/checks/spelling.sh \
aux/checks/todos.sh \
aux/checks/repo.sh \
$(test-files): ALWAYS manfooter.sentinel
env MAILING_LIST='$(MAILING_LIST)' sh $@
aux/checks/assert-manpages.sh: manfooter.sentinel
manfooter.sentinel:
$(MAKE) -f aux/dev.mk `echo aux/checks/manpages/*.in | sed 's|\.in||g'`
touch $@
dev-check: $(test-files)
ALWAYS:
|