Boris | 3 Jul 17:02

Do the Boost documentation tools work on Cygwin?

According to  
http://www.boost.org/doc/libs/1_35_0/doc/html/boostbook/getting/started.html  
it's recommended to execute the script tools/boostbook/setup_boostbook.sh  
for an automatic installation and configuration of the Boost documentation  
tools. When I try it I get this:

$ ../boost_1_35_0/tools/boostbook/setup_boostbook.sh
../boost_1_35_0/tools/boostbook/setup_boostbook.sh: line 7: $'\r': command  
not found
../boost_1_35_0/tools/boostbook/setup_boostbook.sh: line 16: $'\r':  
command not found
../boost_1_35_0/tools/boostbook/setup_boostbook.sh: line 18: $'\r':  
command not found
../boost_1_35_0/tools/boostbook/setup_boostbook.sh: line 56: syntax error  
near unexpected token `$'do\r''
'./boost_1_35_0/tools/boostbook/setup_boostbook.sh: line 56: `for dir in  
$PATH; do

As there is a reference to Windows with Cygwin on  
http://www.boost.org/doc/libs/1_35_0/doc/html/boostbook/getting/started.html  
I expected the script to work on Cygwin. Can anyone tell me if this Cygwin  
is supported and the script supposed to work on Cygwin?

Boris
John Maddock | 4 Jul 18:06

Re: Do the Boost documentation tools work on Cygwin?


Boris wrote:
>> According to
>> http://www.boost.org/doc/libs/1_35_0/doc/html/boostbook/getting/started.html
>> it's recommended to execute the script
>> tools/boostbook/setup_boostbook.sh for an automatic installation and
>> configuration of the Boost documentation tools. When I try it I get
>> this:
>>
>> $ ../boost_1_35_0/tools/boostbook/setup_boostbook.sh
>> .../boost_1_35_0/tools/boostbook/setup_boostbook.sh: line 7: $'\r':
>> command not found
>> .../boost_1_35_0/tools/boostbook/setup_boostbook.sh: line 16: $'\r':
>> command not found
>> .../boost_1_35_0/tools/boostbook/setup_boostbook.sh: line 18: $'\r':
>> command not found
>> .../boost_1_35_0/tools/boostbook/setup_boostbook.sh: line 56: syntax
>> error near unexpected token `$'do\r''
>> './boost_1_35_0/tools/boostbook/setup_boostbook.sh: line 56: `for
>> dir in $PATH; do

Looks like you have the Win32 .zip file of Boost with \r\n line endings, and 
a Cygwin install that expects only \n line endings.

>> As there is a reference to Windows with Cygwin on
>> http://www.boost.org/doc/libs/1_35_0/doc/html/boostbook/getting/started.html
>> I expected the script to work on Cygwin. Can anyone tell me if this
>> Cygwin is supported and the script supposed to work on Cygwin?

If you fix the line endings then yes, probably.  But it might be easier to 
(Continue reading)

Steven Watanabe | 4 Jul 18:15

Re: Do the Boost documentation tools work on Cygwin?

AMDG

John Maddock <john <at> johnmaddock.co.uk> writes:

> If you fix the line endings then yes, probably.  But it might be easier to 
> use the Win32 documentation toolchain.
> 

Shouldn't shell scripts always use \n?
I've had trouble building bjam on cygwin
for the same reason.  This is as easy as
setting svn:eol-style to LF.

In Christ,
Steven Watanabe
John Maddock | 4 Jul 19:07

Re: Do the Boost documentation tools work on Cygwin?


Steven Watanabe wrote:
>> Shouldn't shell scripts always use \n?
>> I've had trouble building bjam on cygwin
>> for the same reason.  This is as easy as
>> setting svn:eol-style to LF.

I'm fine with that if you want to make the change,

John.
Boris | 7 Jul 01:36

Re: Do the Boost documentation tools work on Cygwin?

On Fri, 04 Jul 2008 18:06:11 +0200, John Maddock <john <at> johnmaddock.co.uk>  
wrote:

> [...]
>>> As there is a reference to Windows with Cygwin on
>>> http://www.boost.org/doc/libs/1_35_0/doc/html/boostbook/getting/started.html
>>> I expected the script to work on Cygwin. Can anyone tell me if this
>>> Cygwin is supported and the script supposed to work on Cygwin?
>
> If you fix the line endings then yes, probably.  But it might be easier  
> to use the Win32 documentation toolchain.

Thanks, good to know to try it when I've more time. :) Right now I would  
be already happy to know how to create the documentation manually. I know  
that xsltproc and doxygen are invoked but how exactly? Is it somewhere  
explained in the documentation?

I played around with xsltproc - this seems to do the job:

xsltproc boost_1_35_0/tools/boostbook/xsl/html.xsl  
my_new_library_documentation.xml

If I process the library's source code with doxygen how I do integrate the  
generated HTML pages? I suppose this is normally done automatically by the  
tools, too?

Boris
Frank Mori Hess | 7 Jul 15:43
Favicon

Re: Do the Boost documentation tools work on Cygwin?


On Sunday 06 July 2008 19:36 pm, Boris wrote:
> If I process the library's source code with doxygen how I do integrate the
> generated HTML pages? I suppose this is normally done automatically by the
> tools, too?

There is a xsl/docbook/doxygen2boostbook.xsl stylesheet I believe you can use 
(although I've never done it).  I would guess you have to run doxygen to 
output xml and then run the stylesheet on that.
John Maddock | 10 Jul 11:45

Re: Do the Boost documentation tools work on Cygwin?


Boris wrote:
>> Thanks, good to know to try it when I've more time. :) Right now I
>> would be already happy to know how to create the documentation
>> manually. I know that xsltproc and doxygen are invoked but how
>> exactly? Is it somewhere explained in the documentation?
>>
>> I played around with xsltproc - this seems to do the job:
>>
>> xsltproc boost_1_35_0/tools/boostbook/xsl/html.xsl
>> my_new_library_documentation.xml

There's a sample Makefile here which may help: 
http://svn.boost.org/trac/boost/browser/sandbox/math_toolkit/libs/math/doc/sf_and_dist/win32_nmake.mak

>> If I process the library's source code with doxygen how I do
>> integrate the generated HTML pages? I suppose this is normally done
>> automatically by the tools, too?

Yes, that's more complex, because you need to generate XML output from 
doxygen and then process that to Docbook, and then integrate the whole 
lot.... better to let bjam handle it in that case.

John. 

Gmane