summaryrefslogtreecommitdiffstats
path: root/Documentation/Makefile
blob: 8e0281c72937925232d3597e66f4ec11005e0a01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
PKGNAME = nvmetcli
MANPAGE = ${PKGNAME}.8
HTMLFILE = ${PKGNAME}.html
XMLFILE = ${PKGNAME}.xml
INSTALL ?= install
PREFIX := /usr

ASCIIDOC = asciidoc
XMLTO = xmlto --skip-validation

DOCDATA = ${XMLFILE} ${HTMLFILE}
 
${MANPAGE}: ${DOCDATA}
	${XMLTO} man $<
 
%.xml: %.txt
	${ASCIIDOC} -b docbook -d manpage -o $@ $<
 
%.html: %.txt
	${ASCIIDOC} -a toc -o $@ $<
 
installdoc: man8

man8:
	${INSTALL} -m 644 ${MANPAGE} ${PREFIX}/share/man/man8

uninstalldoc:
	-rm -f ${PREFIX}/share/man/man8/${MANPAGE}

clean:
	-rm -f ${MANPAGE} ${HTMLFILE} ${XMLFILE}