-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
manpages: add Makefile to generate man pages from xml files
- Loading branch information
Matthias Ruester
committed
Apr 29, 2013
1 parent
ae6693d
commit c12e7ea
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 $<") |