File: Jamfile

package info (click to toggle)
boost1.74 1.74.0%2Bds1-21
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 463,588 kB
  • sloc: cpp: 3,338,117; xml: 131,293; python: 33,088; ansic: 14,292; asm: 4,038; sh: 3,353; makefile: 1,193; perl: 1,036; yacc: 478; php: 212; ruby: 102; lisp: 24; sql: 13; csh: 6
file content (310 lines) | stat: -rw-r--r-- 7,941 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
#
# Copyright (c) 2013-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
# Copyright (c) 2020 Krystian Stasiowski (sdkrystian at gmail dot com)
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#

project static_string/doc ;

import os ;
import path ;
import boostbook ;
import quickbook ;
import xsltproc ;
import doxygen ;
import modules ;
import saxonhe ;
import common ;

#-------------------------------------------------------------------------------
#
# Build the list of header files that Doxygen will scan. We need
# this list to inform the build system of the dependencies so the
# docs can be rebuild if any of the header files change.
#

local sources = [ path.glob-tree ../include/boost/static_string : *.hpp *.ipp : detail impl ] ;

# Get the configured paths to doxygen and xsltproc

.doxygen = [ doxygen.name ] ;
.doxygen ?= doxygen ;

#ECHO Using doxygen from "$(.doxygen)" ;

.xsltproc = [ xsltproc.name ] ;
.xsltproc ?= xsltproc ;

#ECHO Using xsltproc from "$(.xsltproc)" ;

#-------------------------------------------------------------------------------
#
# Invoke Doxygen to process the header files and produce the XML
# containing the description of the C++ declarations and extracted
# Javadoc comments.
#
make index.xml
    :
        ./source.dox
    :
        @make_doxygen_xml
    :
        <dependency>$(sources)
    ;

rule make_doxygen_xml ( targets * : sources * : properties * )
{
    LIB_DIR on $(targets) =
        [ path.native [ path.parent [ path.root
        [ on $(sources[1]) return $(SEARCH) ] [ path.pwd ] ] ] ] ;
}

if [ os.name ] = NT
{
    actions make_doxygen_xml
    {
        SET LIB_DIR=$(LIB_DIR)
        SET XML_OUTPUT=$(1:D)
        "$(.doxygen)" $(2)
    }
}
else
{
    actions make_doxygen_xml
    {
        export LIB_DIR=$(LIB_DIR)
        export XML_OUTPUT=$(1:D)
        "$(.doxygen)" $(2)
    }
}

#-------------------------------------------------------------------------------
#
# Copy all the XSLT modules to the target directory.
#
# FIXME: Change this so we can just specify a directory,
#        rather than every file individually.
#
#        Also, somehow force dependencies in a general way
#        such that the XSLT has to be executed again
#        if any of the modules change. For example,
#        if base-extract-xml-pages.xml changes, then
#        an invocation of extract-xml-pages.xsl (which
#        imports the former) must be run again.
#
path-constant docca : ../../../tools/docca ;
make extract-xml-pages.xsl      : $(docca)/include/docca/extract-xml-pages.xsl      : @copy_script ;
make base-extract-xml-pages.xsl : $(docca)/include/docca/base-extract-xml-pages.xsl : @copy_script ;
make common.xsl                 : $(docca)/include/docca/common.xsl                 : @copy_script ;
make stage1.xsl                 : $(docca)/include/docca/stage1.xsl                 : @copy_script ;
make base-stage1.xsl            : $(docca)/include/docca/base-stage1.xsl            : @copy_script ;
make stage2.xsl                 : $(docca)/include/docca/stage2.xsl                 : @copy_script ;
make assemble-quickbook.xsl     : $(docca)/include/docca/assemble-quickbook.xsl     : @copy_script ;
make emphasized-types.xsl       : $(docca)/include/docca/emphasized-types.xsl       : @copy_script ;

make config.xsl
    :
        $(docca)/include/docca/config.xsl
        xsl/config.xsl
        xsl/class_detail.xsl
        xsl/includes.xsl
    :
        @make_config
    ;

actions make_config
{
    cp $(2[1]) $(1)
    sed -i -e "/<!-- CONFIG_TEMPLATE -->/{r $(2[2])" -e "d}" $(1)
    sed -i -e "/<!-- CLASS_DETAIL_TEMPLATE -->/{r $(2[3])" -e "d}" $(1)
    sed -i -e "/<!-- INCLUDES_TEMPLATE -->/{r $(2[4])" -e "d}" $(1)
}

# Make a copy of the given file.
#
actions copy_script
{
    cp $(2[1]) $(1)
}


# This is to initially create the directory as a side effect; I'm sure there's a better way...
make xml-pages/directory/placeholder : index.xml : @null_action ;

#-------------------------------------------------------------------------------
#
# Run index.xml through the first transformation stage
# (assembling and splitting the XML into page-specific files).
#
make xml-pages.xml
    :
        index.xml
        extract-xml-pages.xsl

        # Make bjam aware of additional dependencies
        base-extract-xml-pages.xsl
        config.xsl
        common.xsl
    :
        saxonhe.saxonhe
    ;

# This is just to make the directory eligible as a source
make xml-pages : index.xml : @null_action ;

# Not ready for prime time until I figure out how to get the xslt-visualizer code in place
#make stage1/code-trace-enabled/stage1.xsl
#    :
#        stage1.xsl
#        xslt-visualizer/xsl/trace-enable.xsl
#    :
#        saxonhe.saxonhe
#    ;

# This is to initially create the directory as a side effect; I'm sure there's a better way...
make stage1/results/directory/placeholder : xml-pages.xml : @null_action ;
make stage2/results/directory/placeholder : xml-pages.xml : @null_action ;

# TODO: figure out why this (and the following stage) get built every time
make stage1/results
    :
        xml-pages
        stage1.xsl

        # additional dependencies
        xml-pages.xml
        base-stage1.xsl
        config.xsl
        common.xsl
    :
        saxonhe.saxonhe_dir
    ;

make stage2/results
    :
        stage1/results
        stage2.xsl

        # additional dependencies
        emphasized-types.xsl
    :
        saxonhe.saxonhe_dir
    ;

make reference.qbk
    :
        xml-pages.xml
        assemble-quickbook.xsl

        # TODO: make this input to the XSLT somehow
        #       rather than relying on it being hard-coded
        #       in the XSLT (which it is!)
        stage2/results
    :
        saxonhe.saxonhe
    ;

actions make_dir
{
    mkdir $(1)
}

make combine.xslt : index.xml : @null_action ;

actions touch_file
{
    touch $(1) ;
}

actions null_action
{
    touch -c $(1) ;
}

make reference.xml
    :
        combine.xslt
        index.xml
    :
        @call-xsltproc
    ;

actions call-xsltproc
{
    "$(.xsltproc)" $(2) > $(1)
}

#-------------------------------------------------------------------------------
#
# Produce the reference.qbk file by running
# the reference xml through the transform.
#
#make reference.qbk
#    :
#        reference.xml
#        transform.xsl
#    :
#        saxonhe.saxonhe
#    ;

# We have to make a copy of reference.qbk and put it
# in a place where the static .qbk files can find it
#
install qbk : reference.qbk ;

#-------------------------------------------------------------------------------
#
# Produce the Boost.Book XML from the QuickBook
#

install images
    :
    :
        <location>html/static_string/images
    ;

explicit images ;

xml static_string_doc
    :
        qbk/main.qbk
    :
        <dependency>images
        <dependency>qbk
    ;

explicit static_string_doc ;

#-------------------------------------------------------------------------------
#
# HTML documentation for $(BOOST_ROOT)/doc/html
#
#-------------------------------------------------------------------------------

boostbook static_string
    :
        static_string_doc
    :
        <xsl:param>boost.root=../../../..
        <xsl:param>chapter.autolabel=0
        <xsl:param>chunk.section.depth=8               # Depth to which sections should be chunked
        <xsl:param>chunk.first.sections=1              # Chunk the first top-level section?
        <xsl:param>generate.toc=""
        <include>../../../tools/boostbook/dtd
    :
        <dependency>images
    ;

#-------------------------------------------------------------------------------
#
# These are used to inform the build system of the
# means to build the integrated and stand-alone docs.
#

alias boostdoc ;
explicit boostdoc ;

alias boostrelease : static_string ;
explicit boostrelease ;