aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--Documentation/Makefile19
-rw-r--r--Makefile6
2 files changed, 15 insertions, 10 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)
diff --git a/Makefile b/Makefile
index 25d3e53..dc5241e 100644
--- a/Makefile
+++ b/Makefile
@@ -82,7 +82,7 @@ objtree := $(CURDIR)
82src := $(srctree) 82src := $(srctree)
83obj := $(objtree) 83obj := $(objtree)
84 84
85export prefix bindir 85export prefix bindir src obj
86 86
87# Shell quotes 87# Shell quotes
88bindir_SQ = $(subst ','\'',$(bindir)) 88bindir_SQ = $(subst ','\'',$(bindir))
@@ -419,10 +419,10 @@ install_gui: install_cmd gui
419 $(Q)$(call do_install, kernelshark, '$(bindir_SQ)') 419 $(Q)$(call do_install, kernelshark, '$(bindir_SQ)')
420 420
421doc: 421doc:
422 $(MAKE) -C Documentation all 422 $(MAKE) -C $(src)/Documentation all
423 423
424doc_clean: 424doc_clean:
425 $(MAKE) -C Documentation clean 425 $(MAKE) -C $(src)/Documentation clean
426 426
427clean: 427clean:
428 $(RM) *.o *~ $(TARGETS) *.a *.so ctracecmd_wrap.c .*.d 428 $(RM) *.o *~ $(TARGETS) *.a *.so ctracecmd_wrap.c .*.d