diff options
author | Steven Rostedt <srostedt@redhat.com> | 2010-03-25 22:57:32 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-03-25 22:57:32 -0400 |
commit | 190f587a956789c033583aafd8186eb4ddbebbe1 (patch) | |
tree | c62510c1ebfbdce437a4f8bddff7c623b56c23cc /Documentation | |
parent | 1e2461ac3a5bbc9104d4aa14d41c351e2e20820b (diff) |
build: Make doc build handle O=/path/to/output/dir
Update the Documentation Makefile to handle building outside the source tree.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/Makefile | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/Documentation/Makefile b/Documentation/Makefile index 87c38ae..758897c 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile | |||
@@ -1,19 +1,23 @@ | |||
1 | 1 | ||
2 | obj := $(obj)/Documentation | ||
3 | src := $(src)/Documentation | ||
4 | |||
2 | # | 5 | # |
3 | # Most likely a docbook.xsl is already installed on the users system | 6 | # 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. | 7 | # instead of creating a new wheel, lets reuse what's already there. |
5 | # | 8 | # |
6 | MANPAGE_DOCBOOK_XSL = $(shell locate manpages/docbook.xsl | head -1) | 9 | MANPAGE_DOCBOOK_XSL = $(shell locate manpages/docbook.xsl | head -1) |
7 | 10 | ||
8 | %.xml: %.txt | 11 | $(obj)/%.xml: $(src)/%.txt |
9 | asciidoc -d manpage -b docbook $< | 12 | mkdir -p $(obj) |
13 | asciidoc -d manpage -b docbook -o $@ $< | ||
10 | 14 | ||
11 | %.1: %.xml manpage.xsl | 15 | $(obj)/%.1: $(obj)/%.xml manpage.xsl |
12 | xsltproc --nonet ${MANPAGE_DOCBOOK_XSL} $< > $@ | 16 | xsltproc --nonet -o $@ ${MANPAGE_DOCBOOK_XSL} $< |
13 | 17 | ||
14 | TEXT = $(wildcard *.txt) | 18 | TEXT = $(wildcard *.txt) |
15 | XML = $(patsubst %.txt,%.xsl, ${TEXT}) | 19 | XML = $(patsubst %.txt,$(obj)/%.xsl, ${TEXT}) |
16 | MAN = $(patsubst %.txt,%.1, ${TEXT}) | 20 | MAN = $(patsubst %.txt,$(obj)/%.1, ${TEXT}) |
17 | 21 | ||
18 | all: ${MAN} | 22 | all: ${MAN} |
19 | 23 | ||
@@ -26,4 +30,5 @@ manpage.xsl: | |||
26 | fi | 30 | fi |
27 | 31 | ||
28 | clean: | 32 | clean: |
29 | $(RM) *.xml *.1 | 33 | (cd $(obj); \ |
34 | $(RM) *.xml *.1) | ||