Skip to content

Commit

Permalink
manpages: add Makefile to generate man pages from xml files
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Ruester committed Apr 29, 2013
1 parent ae6693d commit c12e7ea
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions manpages/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
quiet-command = $(if ${V},${1},$(if ${2},@echo ${2} && ${1}, @${1}))

MANPAGES += bee
MANPAGES += bee-check
MANPAGES += bee-download
MANPAGES += bee-list
MANPAGES += bee-init
MANPAGES += bee-install
MANPAGES += bee-query
MANPAGES += bee-remove

XMLTO = xmlto
XMLTO_FLAGS = --stringparam man.output.quietly=1

.PHONY: all
all:
@echo "Following targets are availabe:"
@echo " xml2man - update manpages"

.PHONY: xml2man
xml2man: force-clean $(addsuffix .1.in,$(MANPAGES))

.PHONY: force-clean
force-clean:
$(call quiet-command,rm -f $(addsuffix .1.in,$(MANPAGES)),"CLEAN *.1.in")
$(call quiet-command,rm -f $(addsuffix .1, $(MANPAGES)),"CLEAN *.1")

%.1: %.xml
$(call quiet-command,$(XMLTO) $(XMLTO_FLAGS) man $<,"XMLTO $<")

%.1.in: %.1
$(call quiet-command,mv $< $@,"RENAME $<")

0 comments on commit c12e7ea

Please sign in to comment.