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
| | Kakoune compresses its manpages, which makes the build non-reproducible (as it
leaves timestamps in files). If we don't do that here, and instead do it in
the guix phases `compress-manpages` then the build is reproducible.
--- a/src/Makefile
+++ b/src/Makefile
@@ -22,7 +22,7 @@
objects := $(addprefix ., $(sources:.cc=$(suffix).o))
deps := $(addprefix ., $(sources:.cc=$(suffix).d))
docs := $(wildcard ../doc/manpages/*.asciidoc)
-mandocs := $(docs:.asciidoc=.gz)
+mandocs := $(docs:.asciidoc=.1)
PREFIX ?= /usr/local
DESTDIR ?= # root dir
@@ -76,19 +76,17 @@
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -MD -MP -MF $(addprefix ., $(<:.cc=$(suffix).d)) -c -o $@ $<
# Generate the man page
-../doc/kak.1.gz: ../doc/kak.1.txt
+../doc/kak.1: ../doc/kak.1.txt
a2x --no-xmllint -f manpage $<
- gzip -f $(basename $<)
# Generate the editor's documentation pages
# Since `a2x` won't generate man pages if some sections are missing (which we don't need),
-# we generate the pages, patch them and then compress them
-../doc/manpages/%.gz: ../doc/manpages/%.asciidoc
+# we generate the pages and patch them
+../doc/manpages/%.1: ../doc/manpages/%.asciidoc
a2x --no-xmllint -f manpage $<
sed -i -r -e "s,^\.TH .+,.TH KAKOUNE 1 \"\" \"\" \"$(basename $(notdir $<))\"," \
- -e "/^\.SH \"NAME\"/{N;d;}" $(@:.gz=.1)
- gzip -f $(@:.gz=.1)
- mv -f $(@:.gz=.1.gz) $@
+ -e "/^\.SH \"NAME\"/{N;d;}" $@
+
check: test
test:
@@ -97,7 +95,7 @@
TAGS: tags
tags:
ctags -R
-man: ../doc/kak.1.gz
+man: ../doc/kak.1
doc: $(mandocs)
clean:
@@ -124,8 +122,8 @@
[ -e $(sharedir)/autoload ] || ln -s rc $(sharedir)/autoload
install -m 0644 ../colors/* $(sharedir)/colors
install -m 0644 ../README.asciidoc $(docdir)
- install -m 0644 ../doc/manpages/*.gz $(docdir)/manpages
- install -m 0644 ../doc/kak.1.gz $(mandir)
+ install -m 0644 ../doc/manpages/*.1 $(docdir)/manpages
+ install -m 0644 ../doc/kak.1 $(mandir)
install-strip: install
strip -s $(bindir)/kak
@@ -134,7 +132,7 @@
rm -rf $(bindir)/kak \
$(sharedir) \
$(docdir) \
- $(mandir)/kak.1.gz
+ $(mandir)/kak.1
.PHONY: check TAGS clean distclean installdirs install install-strip uninstall
.PHONY: tags test man doc
|