aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-12-02 12:49:09 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-12-02 13:22:29 +0100
commite945f1fd6e57079477f17dc6c1409185549fbae7 (patch)
treeb217af89874afaf7929853836d333fe4c4336980 /Makefile
parent0354d890cbcba47772b7d11b56967ae1c8b413b3 (diff)
downloadvis-e945f1fd6e57079477f17dc6c1409185549fbae7.tar.gz
vis-e945f1fd6e57079477f17dc6c1409185549fbae7.tar.xz
build: add new `make man` target
Uses mandoc(1) to generate manual pages in HTML format.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 84ee2d2..809cf98 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,8 @@ SRC = array.c buffer.c libutf.c main.c map.c register.c ring-buffer.c \
ui-curses.c view.c vis.c vis-lua.c vis-modes.c vis-motions.c \
vis-operators.c vis-prompt.c vis-text-objects.c
+MANUALS = vis.1 vis-clipboard.1 vis-menu.1 vis-open.1
+
# conditionally initialized, this is needed for standalone build
# with empty config.mk
PREFIX ?= /usr/local
@@ -77,6 +79,12 @@ dist: clean
@echo creating dist tarball
@git archive --prefix=vis-${VERSION}/ -o vis-${VERSION}.tar.gz HEAD
+man:
+ @for m in ${MANUALS}; do \
+ echo "Generating $$m"; \
+ sed -e "s/VERSION/${VERSION}/" "$$m" | mandoc -W warning -T utf8 -T xhtml -O man=%N.%S.html -O style=mandoc.css 1> "$$m".html || true; \
+ done
+
install: vis vis-menu
@echo stripping executable
@${STRIP} vis