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)
downloadkernel-shark-190f587a956789c033583aafd8186eb4ddbebbe1.tar.gz
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 87c38aeb..758897cf 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -1,19 +1,23 @@
+obj := $(obj)/Documentation
+src := $(src)/Documentation
+
#
# Most likely a docbook.xsl is already installed on the users system
# instead of creating a new wheel, lets reuse what's already there.
#
MANPAGE_DOCBOOK_XSL = $(shell locate manpages/docbook.xsl | head -1)
-%.xml: %.txt
- asciidoc -d manpage -b docbook $<
+$(obj)/%.xml: $(src)/%.txt
+ mkdir -p $(obj)
+ asciidoc -d manpage -b docbook -o $@ $<
-%.1: %.xml manpage.xsl
- xsltproc --nonet ${MANPAGE_DOCBOOK_XSL} $< > $@
+$(obj)/%.1: $(obj)/%.xml manpage.xsl
+ xsltproc --nonet -o $@ ${MANPAGE_DOCBOOK_XSL} $<
TEXT = $(wildcard *.txt)
-XML = $(patsubst %.txt,%.xsl, ${TEXT})
-MAN = $(patsubst %.txt,%.1, ${TEXT})
+XML = $(patsubst %.txt,$(obj)/%.xsl, ${TEXT})
+MAN = $(patsubst %.txt,$(obj)/%.1, ${TEXT})
all: ${MAN}
@@ -26,4 +30,5 @@ manpage.xsl:
fi
clean:
- $(RM) *.xml *.1
+ (cd $(obj); \
+ $(RM) *.xml *.1)