Subject: Re: [Boost-docs] Can't build bjam docs
From: John Maddock (john_at_[hidden])
Date: 2007-09-19 17:49:34
John Maddock wrote:
>>> PS. I guess I continue trying to /kludge/ it into a working state.
>>> As I really need to do a bjam release this weekend.
>>
>> Please find attached a Jamfile that works for me, and looks for
>> images and logo's in the existing locations (as long as the docs are
>> in a directory called "doc"). I'll look into fixing the XSL so it
>> emulates the old behaviour as well.
>>
>> Hope this gets you going in the mean time, John.
On second thoughts.... do you need to ship *just* the contents of the
tools/jam/doc/html directory? If so the previous Jamfile won't do it, but
will work if you're shipping all of tools/jam/.
The Jamfile-hack workaround would be to revert to using boost.root=. and
simply install the images in a different directory: html/doc/html/images
rather than the usual html/images.
I've played around trying to fix things in the XSL so that we preserve the
old behaviour as well as providing the option to set boost.root and have
everything "just found", but there's no easy way, the best I can come up
with is to replace:
<xsl:param name = "admon.graphics.path"
select = "concat($boost.root, '/doc/html/images/')"/>
<xsl:param name = "navig.graphics.path"
select = "concat($boost.root, '/doc/html/images/')"/>
with:
<xsl:param name = "admon.graphics.path">
<xsl:choose>
<xsl:when test="$boost.root != '../..' and $boost.root != '..' and
$boost.root != '.'">
<xsl:value-of select="concat($boost.root, '/doc/html/images/')"/>
</xsl:when>
<xsl:otherwise>images/</xsl:otherwise>
</xsl:choose>
</xsl:param>
<xsl:param name = "navig.graphics.path">
<xsl:choose>
<xsl:when test="$boost.root != '../..' and $boost.root != '..' and
$boost.root != '.'">
<xsl:value-of select="concat($boost.root, '/doc/html/images/')"/>
</xsl:when>
<xsl:otherwise>images/</xsl:otherwise>
</xsl:choose>
</xsl:param>
inside tools/boostbook/xsl/html.xsl.
Basically the idea is that if boost.root is set to within the current
directory tree (or is not set and is taking it's default value), then we go
back to the old default of images/ for the images path. This isn't quite
compatible with the intended new style behaviour if you use either ".." or
"." as the boost.root. On the other hand, it is reasonably sensible, if a
potential for causing surprises.
Let me know if you want me to commit the change.
The other thing I'd still really like to see fixed, is bjam's insistance on
stripping trailing /'s from paths. Currently it breaks all kinds of
Boostbook XSL options :-( Do you know if there is any way to work around
this?
John.
This archive was generated by hypermail 2.1.7 : 2017-11-11 08:50:40 UTC