|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r83204 - trunk/tools/build/v2/tools
From: steven_at_[hidden]
Date: 2013-02-28 12:59:15
Author: steven_watanabe
Date: 2013-02-28 12:59:15 EST (Thu, 28 Feb 2013)
New Revision: 83204
URL: http://svn.boost.org/trac/boost/changeset/83204
Log:
Make BoostBook errors lazy to avoid causing an error when BoostBook isn't used.
Text files modified:
trunk/tools/build/v2/tools/boostbook.jam | 45 +++++++++++++++++++++++++--------------
1 files changed, 29 insertions(+), 16 deletions(-)
Modified: trunk/tools/build/v2/tools/boostbook.jam
==============================================================================
--- trunk/tools/build/v2/tools/boostbook.jam (original)
+++ trunk/tools/build/v2/tools/boostbook.jam 2013-02-28 12:59:15 EST (Thu, 28 Feb 2013)
@@ -150,6 +150,11 @@
if ! $(.config-locked)
{
.config-locked = true ;
+
+ if $(.error-message)
+ {
+ print-error $(.error-message) ;
+ }
}
}
@@ -164,6 +169,18 @@
}
}
+rule print-error ( location message * )
+{
+ ECHO error: at $(location) ;
+ ECHO error: $(message) ;
+ EXIT ;
+}
+
+rule make-error ( message * )
+{
+ return [ errors.nearest-user-location ] $(message) ;
+}
+
rule find-boost-in-registry ( keys * )
{
@@ -188,8 +205,8 @@
if ! [ path.glob $(.docbook-xsl-dir) : common/common.xsl ]
{
import errors ;
- errors.user-error BoostBook: could not find docbook XSL stylesheets
- in: [ path.native $(.docbook-xsl-dir) ] ;
+ .error-message = [ make-error BoostBook: could not find docbook XSL stylesheets
+ in: [ path.native $(.docbook-xsl-dir) ] ] ;
}
else if $(.debug-configuration)
{
@@ -207,8 +224,8 @@
if ! [ path.glob $(.docbook-dtd-dir) : docbookx.dtd ]
{
import errors ;
- errors.user-error BoostBook: could not find docbook DTD in: [
- path.native $(.docbook-dtd-dir) ] ;
+ .error-message = [ make-error BoostBook: could not find docbook DTD in: [
+ path.native $(.docbook-dtd-dir) ] ] ;
}
else if $(.debug-configuration)
{
@@ -223,14 +240,12 @@
{
if ! $(.boostbook-xsl-dir)
{
- import errors ;
- errors.user-error BoostBook: could not find boostbook XSL stylesheets. ;
+ .error-message = [ make-error BoostBook: could not find boostbook XSL stylesheets. ] ;
}
else if ! [ path.glob $(.boostbook-xsl-dir) : docbook.xsl ]
{
- import errors ;
- errors.user-error BoostBook: could not find docbook XSL stylesheets in:
- [ path.native $(.boostbook-xsl-dir) ] ;
+ .error-message = [ make-error BoostBook: could not find docbook XSL stylesheets in:
+ [ path.native $(.boostbook-xsl-dir) ] ] ;
}
else if $(.debug-configuration)
{
@@ -244,14 +259,12 @@
{
if ! $(.boostbook-dtd-dir)
{
- import errors ;
- errors.user-error BoostBook: could not find boostbook DTD. ;
+ .error-message = [ make-error BoostBook: could not find boostbook DTD. ] ;
}
else if ! [ path.glob $(.boostbook-dtd-dir) : boostbook.dtd ]
{
- import errors ;
- errors.user-error BoostBook: could not find boostbook DTD in: [
- path.native $(.boostbook-dtd-dir) ] ;
+ .error-message = [ make-error BoostBook: could not find boostbook DTD in: [
+ path.native $(.boostbook-dtd-dir) ] ] ;
}
else if $(.debug-configuration)
{
@@ -266,8 +279,8 @@
if $(boostbook-dir) && ! [ path.glob $(boostbook-dir) : xsl ]
{
import errors ;
- errors.user-error BoostBook: could not find boostbook in: [ path.native
- $(boostbook-dir) ] ;
+ .error-message = [ make-error BoostBook: could not find boostbook in: [ path.native
+ $(boostbook-dir) ] ] ;
}
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk