summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2017-11-19 15:28:30 +0800
committerMaxime Coste <mawww@kakoune.org>2017-11-19 15:28:30 +0800
commit079b006cdab6f0ae594f80fff18ad61b71b0754d (patch)
tree92c8f2d2deb22bf48b6777e6dea234d9b83cbe40 /src
parent323f4a6a82dfb4408d358d5361dab7fb9e33357a (diff)
parent3e1a4df3fb7c761cfb5d16f1a823ae52877a0de2 (diff)
Merge remote-tracking branch 'somasis/gzip-man'
Diffstat (limited to 'src')
-rw-r--r--src/Makefile24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile
index 50dc32b5..bd1f259f 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,5 +1,12 @@
debug ?= yes
static ?= no
+gzip_man ?= yes
+
+ifneq ($(gzip_man),yes)
+ ifneq ($(gzip_man),no)
+ $(error gzip_man should be either yes or no)
+ endif
+endif
ifeq ($(debug),yes)
CPPFLAGS += -DKAK_DEBUG
@@ -73,9 +80,16 @@ kak$(suffix) : $(objects)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -MD -MP -MF $(addprefix ., $(<:.cc=$(suffix).d)) -c -o $@ $<
# Generate the man page
+ifeq ($(gzip_man),yes)
../doc/kak.1.gz: ../doc/kak.1.txt
a2x --no-xmllint -f manpage $<
gzip -n -9 -f $(basename $<)
+man: ../doc/kak.1.gz
+else
+../doc/kak.1: ../doc/kak.1.txt
+ a2x --no-xmllint -f manpage $<
+man: ../doc/kak.1
+endif
check: test
test:
@@ -84,14 +98,13 @@ test:
TAGS: tags
tags:
ctags -R
-man: ../doc/kak.1.gz
clean:
rm -f .*.o .*.d
distclean: clean
rm -f kak kak$(suffix)
- find ../doc -type f -name \*\\.gz -exec rm -f '{}' +
+ find ../doc -type f \( -name \*\\.gz -o -name \*\\.1 \) -exec rm -f '{}' +
installdirs:
install -d $(bindir) \
@@ -113,7 +126,11 @@ install: kak man installdirs
[ -e $(sharedir)/autoload ] || ln -s rc $(sharedir)/autoload
install -m 0644 ../colors/* $(sharedir)/colors
install -m 0644 ../README.asciidoc $(docdir)
+ifeq ($(gzip_man),yes)
install -m 0644 ../doc/kak.1.gz $(mandir)
+else
+ install -m 0644 ../doc/kak.1 $(mandir)
+endif
install-strip: install
strip -s $(bindir)/kak
@@ -122,7 +139,8 @@ uninstall:
rm -rf $(bindir)/kak \
$(sharedir) \
$(docdir) \
- $(mandir)/kak.1.gz
+ $(mandir)/kak.1.gz \
+ $(mandir)/kak.1
.PHONY: check TAGS clean distclean installdirs install install-strip uninstall
.PHONY: tags test man kak