2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 01:12:13 +00:00

Makes it possible to use an installed docutils without referring to a

source distro directory.

[SVN r52306]
This commit is contained in:
Dave Abrahams
2009-04-10 20:02:51 +00:00
parent b15d1b6464
commit 7543e32ec9

10
v2/tools/docutils.jam Executable file → Normal file
View File

@@ -42,15 +42,19 @@ type.set-scanner ReST : rst-scanner ;
generators.register-standard docutils.html : ReST : HTML ;
rule init ( docutils-dir ? )
rule init ( docutils-dir ? : tools-dir ? )
{
ECHO docutils-dir= $(docutils-dir) ;
docutils-dir ?= [ modules.peek : DOCUTILS_DIR ] ;
ECHO tools-dir= $(tools-dir) ;
tools-dir ?= $(docutils-dir)/tools ;
if ! $(.initialized)
{
.initialized = true ;
.docutils-dir = $(docutils-dir) ;
.tools-dir = $(tools-dir:R="") ;
.setup = [
common.prepend-path-variable-command PYTHONPATH
: $(.docutils-dir) $(.docutils-dir)/extras ] ;
@@ -62,7 +66,7 @@ rule html ( target : source : properties * )
if ! [ on $(target) return $(RST2XXX) ]
{
local python-cmd = [ property.select <python.interpreter> : $(properties) ] ;
RST2XXX on $(target) = $(python-cmd:G=:E="python") $(.docutils-dir)/tools/rst2html.py ;
RST2XXX on $(target) = $(python-cmd:G=:E="python") $(.tools-dir)/rst2html.py ;
}
}