aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-03-25 22:57:32 -0400
committerSteven Rostedt <rostedt@goodmis.org>2010-03-25 22:57:32 -0400
commit190f587a956789c033583aafd8186eb4ddbebbe1 (patch)
treec62510c1ebfbdce437a4f8bddff7c623b56c23cc /Documentation
parent1e2461ac3a5bbc9104d4aa14d41c351e2e20820b (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/Makefile19
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
2obj := $(obj)/Documentation
3src := $(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#
6MANPAGE_DOCBOOK_XSL = $(shell locate manpages/docbook.xsl | head -1) 9MANPAGE_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
14TEXT = $(wildcard *.txt) 18TEXT = $(wildcard *.txt)
15XML = $(patsubst %.txt,%.xsl, ${TEXT}) 19XML = $(patsubst %.txt,$(obj)/%.xsl, ${TEXT})
16MAN = $(patsubst %.txt,%.1, ${TEXT}) 20MAN = $(patsubst %.txt,$(obj)/%.1, ${TEXT})
17 21
18all: ${MAN} 22all: ${MAN}
19 23
@@ -26,4 +30,5 @@ manpage.xsl:
26 fi 30 fi
27 31
28clean: 32clean:
29 $(RM) *.xml *.1 33 (cd $(obj); \
34 $(RM) *.xml *.1)