Skip to content

Commit

Permalink
build: add new make man target
Browse files Browse the repository at this point in the history
Uses mandoc(1) to generate manual pages in HTML format.
  • Loading branch information
martanne committed Dec 2, 2016
1 parent 0354d89 commit e945f1f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e945f1f

Please sign in to comment.