aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/Makefile
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-03-08 22:19:02 -0500
committerSteven Rostedt <rostedt@goodmis.org>2010-03-08 22:19:02 -0500
commit9daa31e0ad4164bf41d8d10cc1630ec3ef9f398c (patch)
treeb6558f0fee210d90eb6da894cc37b6c2ecfb0c26 /Documentation/Makefile
parentefc0bfac7b966fbf4776f11a7922d6c0d92e7ac8 (diff)
trace-cmd: Add Makefile to build man pages
Add a Makefile that has logic to build a man page. It is still very primitive and uses ascriidoc and xsltproc to do the formating. But instead of build my own xsl file or putting together one from others, I decided to use xsl files that already exist by doing a locate on manpages/docbook.xsl, and using what is found. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'Documentation/Makefile')
-rw-r--r--Documentation/Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile
new file mode 100644
index 0000000..87c38ae
--- /dev/null
+++ b/Documentation/Makefile
@@ -0,0 +1,29 @@
1
2#
3# Most likely a docbook.xsl is already installed on the users system
4# instead of creating a new wheel, lets reuse what's already there.
5#
6MANPAGE_DOCBOOK_XSL = $(shell locate manpages/docbook.xsl | head -1)
7
8%.xml: %.txt
9 asciidoc -d manpage -b docbook $<
10
11%.1: %.xml manpage.xsl
12 xsltproc --nonet ${MANPAGE_DOCBOOK_XSL} $< > $@
13
14TEXT = $(wildcard *.txt)
15XML = $(patsubst %.txt,%.xsl, ${TEXT})
16MAN = $(patsubst %.txt,%.1, ${TEXT})
17
18all: ${MAN}
19
20manpage.xsl:
21 @if [ ! -f ${MANPAGE_DOCBOOK_XSL} ]; then \
22 echo "*********************************"; \
23 echo "** No docbook.xsl is installed **"; \
24 echo "** Can't make man pages **"; \
25 echo "*********************************"; \
26 fi
27
28clean:
29 $(RM) *.xml *.1