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

Workaround for bjam scanner bug that captures trailing newlines.

Added docutils-cmd feature that allows the command to be overridden.


[SVN r36492]
This commit is contained in:
Dave Abrahams
2006-12-22 14:50:37 +00:00
parent d6f1461e2d
commit 2e0d7d416d

View File

@@ -19,11 +19,19 @@ type.register ReST : rst ;
class rst-scanner : common-scanner
{
rule __init__ ( paths * )
{
common-scanner.__init__ . $(paths) ;
}
rule pattern ( )
{
return "^\\w*\\.\\.\\w+include::\w+(.*)"
"^\\w*\\.\\.\\w+image::\w+(.*)"
"^\\w*\\.\\.\\w+figure::\w+(.*)"
return "^[ ]*\\.\\.[ ]+include::[ ]+([^
]+)"
"^[ ]*\\.\\.[ ]+image::[ ]+([^
]+)"
"^[ ]*\\.\\.[ ]+figure::[ ]+([^
]+)"
;
}
}
@@ -51,18 +59,23 @@ rule init ( docutils-dir ? )
rule html ( target : source : properties * )
{
local command-prefix = "python "$(.docutils-dir)/tools/ ;
command-prefix on $(target) = $(command-prefix:E="") ;
if ! [ on $(target) return $(RST2XXX) ]
{
RST2XXX on $(target) = $(command-prefix:E="")rst2html.py ;
}
}
feature docutils : : free ;
feature docutils-html : : free ;
feature docutils-cmd : : free ;
toolset.flags docutils COMMON-FLAGS : <docutils> ;
toolset.flags docutils HTML-FLAGS : <docutils-html> ;
toolset.flags docutils RST2XXX : <docutils-cmd> ;
actions html
{
$(.setup)
$(command-prefix)rst2html.py $(COMMON-FLAGS) $(HTML-FLAGS) $(>) $(<)
$(RST2XXX) $(COMMON-FLAGS) $(HTML-FLAGS) $(>) $(<)
}