diff options
author | Steven Rostedt <srostedt@redhat.com> | 2010-03-25 23:07:05 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-03-25 23:07:05 -0400 |
commit | aa7c25ae2a7e2a3563afa1f373244742db68dd59 (patch) | |
tree | 0fa3703fff054b0b1cb189e1a63e4caf785a4c9b | |
parent | 190f587a956789c033583aafd8186eb4ddbebbe1 (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/Makefile | 25 |
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 @@ | |||
2 | obj := $(obj)/Documentation | 2 | obj := $(obj)/Documentation |
3 | src := $(src)/Documentation | 3 | src := $(src)/Documentation |
4 | 4 | ||
5 | ifeq ($(VERBOSE),1) | ||
6 | Q = | ||
7 | print_asciidoc = | ||
8 | print_xsltproc = | ||
9 | else | ||
10 | Q = @ | ||
11 | print_asciidoc = echo ' ASCIIDOC '`basename $@`; | ||
12 | print_xsltproc = echo ' XSLTPROC '`basename $@`; | ||
13 | endif | ||
14 | |||
15 | do_asciidoc_build = \ | ||
16 | ($(print_asciidoc) \ | ||
17 | asciidoc -d manpage -b docbook -o $@ $<) | ||
18 | |||
19 | do_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 | |||
9 | MANPAGE_DOCBOOK_XSL = $(shell locate manpages/docbook.xsl | head -1) | 27 | MANPAGE_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 | ||
18 | TEXT = $(wildcard *.txt) | 37 | TEXT = $(wildcard *.txt) |
19 | XML = $(patsubst %.txt,$(obj)/%.xsl, ${TEXT}) | 38 | XML = $(patsubst %.txt,$(obj)/%.xsl, ${TEXT}) |