Skip to content

[Jamfile] Using B2 Jamfile to Generate Documents

[Jamfile] Using Bjam/B2 Jamfile to Generate Documents

Using Asciidoctor

Install boost_build, asciidoctor

doas pkg update -f
doas pkg install -U boost_build rubygem-asciidoctor

Write adoc. adoc example:

hello.adoc

= Document Title

== Head Title

Some description.

== Head Title

Some description.

Link to <<other.adoc#,Other File>>

other.adoc

This is another adoc.

Write the Jamfile:

Jamfile

using clang ;

using asciidoctor ;

html hello : hello.adoc ;
html other : other.adoc ;

Type 'b2' to build the docs now!

Using boostbook and quickbook (standalone)

boost_build should be installed.

Build and install quickbook:

tar -jxvf boost_1_76_0.tar.bz2
cd ./boost_1_76_0/tools/quickbook/build
b2 toolset=clang variant=release
doas cp ../../../dist/bin/quickbook /usr/local/bin/

Install boostbook (Copy Share File Only)

doas cp -rf boost_1_76_0/tools/boostbook /usr/local/share/

Write qbk file

hello.qbk

 

[/
    Copy Owner

    Copy Info Text
]
[article Document Title
    [quickbook 1.7]
]

Some text here.

[!c++]
```
#include <utxcpp.hpp>

int main() {
    print("Hello Utxcpp!");
}
```

[section:home Home]
[endsect:home]

[section:page1 Page1]
[endsect:page1]

Write Jamfile

Jamfile

using clang ;
using quickbook : /usr/local/bin/quickbook ;
using boostbook ;

xml doc1 : hello.qbk ;

boostbook result : doc1
    :
    <dependency>css
    <xsl:param>html.stylesheet=dst/dir/style.css
    <xsl:param>boost.mobile=0
    ;

install css : src/dir/style.css : <location>html/dst/dir ;
project ThisProject ;

Type 'b2' command to build the document now!

 

 

 

Trackbacks

No Trackbacks

Comments

Display comments as Linear | Threaded

No comments

Add Comment


To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Form options

Submitted comments will be subject to moderation before being displayed.

@freebsdgames.xyz