summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2016-11-03 15:22:49 +1100
committerChris Johns <chrisj@rtems.org>2016-11-03 15:22:49 +1100
commit6207c37d9c8a3d75e67c10671fe2c309c805bbed (patch)
tree78a4c6608f460d450423561988c5215d277db429
parentd3226d3d09eb005859024b42b2878a0f61ad7457 (diff)
downloadrtems-docs-6207c37d9c8a3d75e67c10671fe2c309c805bbed.tar.bz2
waf: Use separate doctrees so avoid sphinx clashes.
-rw-r--r--common/waf.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/common/waf.py b/common/waf.py
index 2fda75c..acc7949 100644
--- a/common/waf.py
+++ b/common/waf.py
@@ -83,7 +83,8 @@ def build_dir_setup(ctx, buildtype):
build_dir = ctx.path.get_bld().relpath()
output_node = ctx.path.get_bld().make_node(buildtype)
output_dir = output_node.abspath()
- return build_dir, output_node, output_dir
+ doctrees = os.path.join(os.path.dirname(output_dir), 'doctrees', buildtype)
+ return build_dir, output_node, output_dir, doctrees
def html_resources(ctx, buildtype):
for dir_name in ["_static", "_templates"]:
@@ -146,10 +147,10 @@ def cmd_configure(ctx):
def doc_pdf(ctx, source_dir, conf_dir):
buildtype = 'latex'
- build_dir, output_node, output_dir = build_dir_setup(ctx, buildtype)
- rule = "${BIN_SPHINX_BUILD} %s -b %s -c %s -d build/%s/doctrees %s %s" % \
+ build_dir, output_node, output_dir, doctrees = build_dir_setup(ctx, buildtype)
+ rule = "${BIN_SPHINX_BUILD} %s -b %s -c %s -d %s %s %s" % \
(sphinx_verbose(ctx), buildtype, conf_dir,
- build_dir, source_dir, output_dir)
+ doctrees, source_dir, output_dir)
ctx(
rule = rule,
cwd = ctx.path,
@@ -198,11 +199,11 @@ def doc_singlehtml(ctx, source_dir, conf_dir):
return r
buildtype = 'singlehtml'
- build_dir, output_node, output_dir = build_dir_setup(ctx, buildtype)
+ build_dir, output_node, output_dir, doctrees = build_dir_setup(ctx, buildtype)
html_resources(ctx, buildtype)
- rule = "${BIN_SPHINX_BUILD} %s -b %s -c %s -d build/%s/doctrees %s %s" % \
+ rule = "${BIN_SPHINX_BUILD} %s -b %s -c %s -d %s %s %s" % \
(sphinx_verbose(ctx), buildtype, conf_dir,
- build_dir, source_dir, output_dir)
+ doctrees, source_dir, output_dir)
ctx(
rule = rule,
cwd = ctx.path,
@@ -220,11 +221,11 @@ def doc_singlehtml(ctx, source_dir, conf_dir):
def doc_html(ctx, conf_dir, source_dir):
buildtype = 'html'
- build_dir, output_node, output_dir = build_dir_setup(ctx, buildtype)
+ build_dir, output_node, output_dir, doctrees = build_dir_setup(ctx, buildtype)
html_resources(ctx, buildtype)
- rule = "${BIN_SPHINX_BUILD} %s -b %s -c %s -d build/%s/doctrees %s %s" % \
+ rule = "${BIN_SPHINX_BUILD} %s -b %s -c %s -d %s %s %s" % \
(sphinx_verbose(ctx), buildtype, conf_dir,
- build_dir, source_dir, output_dir)
+ doctrees, source_dir, output_dir)
ctx(
rule = rule,
cwd = ctx.path,