aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-03-25 23:07:05 -0400
committerSteven Rostedt <rostedt@goodmis.org>2010-03-25 23:07:05 -0400
commitaa7c25ae2a7e2a3563afa1f373244742db68dd59 (patch)
tree0fa3703fff054b0b1cb189e1a63e4caf785a4c9b
parent190f587a956789c033583aafd8186eb4ddbebbe1 (diff)
build: Make the building of documentation look cleaner
Use the "KBUILD" method to build documentation. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r--Documentation/Makefile25
1 files changed, 22 insertions, 3 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 758897c..99a1362 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -2,6 +2,24 @@
2obj := $(obj)/Documentation 2obj := $(obj)/Documentation
3src := $(src)/Documentation 3src := $(src)/Documentation
4 4
5ifeq ($(VERBOSE),1)
6 Q =
7 print_asciidoc =
8 print_xsltproc =
9else
10 Q = @
11 print_asciidoc = echo ' ASCIIDOC '`basename $@`;
12 print_xsltproc = echo ' XSLTPROC '`basename $@`;
13endif
14
15do_asciidoc_build = \
16 ($(print_asciidoc) \
17 asciidoc -d manpage -b docbook -o $@ $<)
18
19do_xsltproc_build = \
20 ($(print_xsltproc) \
21 xsltproc --nonet -o $@ ${MANPAGE_DOCBOOK_XSL} $<)
22
5# 23#
6# Most likely a docbook.xsl is already installed on the users system 24# Most likely a docbook.xsl is already installed on the users system
7# instead of creating a new wheel, lets reuse what's already there. 25# instead of creating a new wheel, lets reuse what's already there.
@@ -9,11 +27,12 @@ src := $(src)/Documentation
9MANPAGE_DOCBOOK_XSL = $(shell locate manpages/docbook.xsl | head -1) 27MANPAGE_DOCBOOK_XSL = $(shell locate manpages/docbook.xsl | head -1)
10 28
11$(obj)/%.xml: $(src)/%.txt 29$(obj)/%.xml: $(src)/%.txt
12 mkdir -p $(obj) 30 $(Q)mkdir -p $(obj)
13 asciidoc -d manpage -b docbook -o $@ $< 31 $(Q)$(do_asciidoc_build)
32
14 33
15$(obj)/%.1: $(obj)/%.xml manpage.xsl 34$(obj)/%.1: $(obj)/%.xml manpage.xsl
16 xsltproc --nonet -o $@ ${MANPAGE_DOCBOOK_XSL} $< 35 $(Q)$(do_xsltproc_build)
17 36
18TEXT = $(wildcard *.txt) 37TEXT = $(wildcard *.txt)
19XML = $(patsubst %.txt,$(obj)/%.xsl, ${TEXT}) 38XML = $(patsubst %.txt,$(obj)/%.xsl, ${TEXT})