Skip to content

Commit 1a7c430

Browse files
committed
added Jamfile for Antora docgen
1 parent b5ba4a2 commit 1a7c430

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

doc/Jamfile.v2

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
import generate ;
2+
import path ;
3+
import property-set ;
4+
import virtual-target ;
5+
6+
path-constant HERE : . ;
7+
8+
make html/index.html : build_antora.sh : @run-script ;
9+
generate files-to-install : html/index.html : <generating-rule>@delayed-glob ;
10+
install install
11+
: files-to-install
12+
: <location>html
13+
<install-source-root>html/openmethod
14+
;
15+
explicit html/index.html files-to-install ;
16+
17+
# this runs the antora script
18+
actions run-script
19+
{
20+
bash $(>)
21+
}
22+
23+
# this globs after its sources are created
24+
rule delayed-glob ( project name : property-set : sources * )
25+
{
26+
for local src in $(sources)
27+
{
28+
# the next line causes the source to be generated immediately
29+
# and not later (which it normally would)
30+
UPDATE_NOW [ $(src).actualize ] ;
31+
}
32+
33+
# we need to construct the path to the globbed directory;
34+
# this path would be <current-project>/antora
35+
local root = [ path.root html [ $(project).location ] ] ;
36+
local files ;
37+
38+
# actual globbing happens here
39+
for local file in [ path.glob-tree $(root) : * ]
40+
{
41+
# we have to skip directories, because our match expression accepts anything
42+
if [ CHECK_IF_FILE $(file) ]
43+
{
44+
# we construct a list of targets to copy
45+
files += [ virtual-target.from-file $(file:D=) : $(file:D) : $(project) ] ;
46+
}
47+
}
48+
49+
# we prepend empty usage requirements to the result
50+
return [ property-set.empty ] $(files) ;
51+
}
52+
53+
###############################################################################
54+
alias boostdoc ;
55+
explicit boostdoc ;
56+
alias boostrelease : install ;
57+
explicit boostrelease ;

0 commit comments

Comments
 (0)