summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Defaults.xml
blob: 71f2f218168c25990cb8179b9a2a29827910998d (plain)
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
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
<!-- __COPYRIGHT__ -->
<builder name="DVI">
<summary>
Builds a <filename>.dvi</filename> file
from a <filename>.tex</filename>,
<filename>.ltx</filename> or <filename>.latex</filename> input file.
If the source file suffix is <filename>.tex</filename>,
&scons;
will examine the contents of the file;
if the string
<literal>\documentclass</literal>
or
<literal>\documentstyle</literal>
is found, the file is assumed to be a LaTeX file and
the target is built by invoking the &cv-LATEXCOM; command line;
otherwise, the &cv-TEXCOM; command line is used.
If the file is a LaTeX file,
the
&b-DVI;
builder method will also examine the contents
of the
<filename>.aux</filename>
file
and invoke the &cv-BIBTEX; command line
if the string
<literal>bibdata</literal>
is found,
and will examine the contents
<filename>.log</filename>
file and re-run the &cv-LATEXCOM; command
if the log file says it is necessary.

The suffix <filename>.dvi</filename>
(hard-coded within TeX itself)
is automatically added to the target
if it is not already present.
Examples:

<example>
# builds from aaa.tex
env.DVI(target = 'aaa.dvi', source = 'aaa.tex')
# builds bbb.dvi
env.DVI(target = 'bbb', source = 'bbb.ltx')
# builds from ccc.latex
env.DVI(target = 'ccc.dvi', source = 'ccc.latex')
</example>
</summary>
</builder>

<builder name="PDF">
<summary>
Builds a <filename>.pdf</filename> file
from a <filename>.dvi</filename> input file
(or, by extension, a <filename>.tex</filename>,
<filename>.ltx</filename>,
or
<filename>.latex</filename> input file).
The suffix specified by the &cv-PDFSUFFIX; construction variable
(<filename>.pdf</filename> by default)
is added automatically to the target
if it is not already present.  Example:

<example>
# builds from aaa.tex
env.PDF(target = 'aaa.pdf', source = 'aaa.tex')
# builds bbb.pdf from bbb.dvi
env.PDF(target = 'bbb', source = 'bbb.dvi')
</example>
</summary>
</builder>

<cvar name ="_concat">
<summary>
A function used to produce variables like &cv-_CPPINCFLAGS;. It takes
four or five
arguments: a prefix to concatenate onto each element, a list of
elements, a suffix to concatenate onto each element, an environment
for variable interpolation, and an optional function that will be
called to transform the list before concatenation.

<example>
env['_CPPINCFLAGS'] = '$( ${_concat(INCPREFIX, CPPPATH, INCSUFFIX, __env__, RDirs)} $)',
</example>
</summary>
</cvar>

<cvar name="CPPDEFINES">
<summary>
A platform independent specification of C preprocessor definitions.
The definitions will be added to command lines
through the automatically-generated
&cv-_CPPDEFFLAGS; construction variable (see below),
which is constructed according to
the type of value of &cv-CPPDEFINES;:

If &cv-CPPDEFINES; is a string,
the values of the
&cv-CPPDEFPREFIX; and &cv-CPPDEFSUFFIX;
construction variables
will be added to the beginning and end.

<example>
# Will add -Dxyz to POSIX compiler command lines,
# and /Dxyz to Microsoft Visual C++ command lines.
env = Environment(CPPDEFINES='xyz')
</example>

If &cv-CPPDEFINES; is a list,
the values of the
&cv-CPPDEFPREFIX; and &cv-CPPDEFSUFFIX;
construction variables
will be appended to the beginning and end
of each element in the list.
If any element is a list or tuple,
then the first item is the name being
defined and the second item is its value:

<example>
# Will add -DB=2 -DA to POSIX compiler command lines,
# and /DB=2 /DA to Microsoft Visual C++ command lines.
env = Environment(CPPDEFINES=[('B', 2), 'A'])
</example>

If &cv-CPPDEFINES; is a dictionary,
the values of the
&cv-CPPDEFPREFIX; and &cv-CPPDEFSUFFIX;
construction variables
will be appended to the beginning and end
of each item from the dictionary.
The key of each dictionary item
is a name being defined
to the dictionary item's corresponding value;
if the value is
<literal>None</literal>,
then the name is defined without an explicit value.
Note that the resulting flags are sorted by keyword
to ensure that the order of the options on the
command line is consistent each time
&scons; is run.

<example>
# Will add -DA -DB=2 to POSIX compiler command lines,
# and /DA /DB=2 to Microsoft Visual C++ command lines.
env = Environment(CPPDEFINES={'B':2, 'A':None})
</example>
</summary>
</cvar>

<cvar name="_CPPDEFFLAGS">
<summary>
An automatically-generated construction variable
containing the C preprocessor command-line options
to define values.
The value of &cv-_CPPDEFFLAGS; is created
by appending &cv-CPPDEFPREFIX; and &cv-CPPDEFSUFFIX;
to the beginning and end
of each directory in &cv-CPPDEFINES;.
</summary>
</cvar>

<cvar name="CPPDEFPREFIX">
<summary>
The prefix used to specify preprocessor definitions
on the C compiler command line.
This will be appended to the beginning of each definition
in the &cv-CPPDEFINES; construction variable
when the &cv-_CPPDEFFLAGS; variable is automatically generated.
</summary>
</cvar>

<cvar name="CPPDEFSUFFIX">
<summary>
The suffix used to specify preprocessor definitions
on the C compiler command line.
This will be appended to the end of each definition
in the &cv-CPPDEFINES; construction variable
when the &cv-_CPPDEFFLAGS; variable is automatically generated.
</summary>
</cvar>

<cvar name="_CPPINCFLAGS">
<summary>
An automatically-generated construction variable
containing the C preprocessor command-line options
for specifying directories to be searched for include files.
The value of &cv-_CPPINCFLAGS; is created
by appending &cv-INCPREFIX; and &cv-INCSUFFIX;
to the beginning and end
of each directory in &cv-CPPPATH;.
</summary>
</cvar>

<cvar name="CPPPATH">
<summary>
The list of directories that the C preprocessor will search for include
directories. The C/C++ implicit dependency scanner will search these
directories for include files. Don't explicitly put include directory
arguments in CCFLAGS or CXXFLAGS because the result will be non-portable
and the directories will not be searched by the dependency scanner. Note:
directory names in CPPPATH will be looked-up relative to the SConscript
directory when they are used in a command. To force 
&scons;
to look-up a directory relative to the root of the source tree use #:

<example>
env = Environment(CPPPATH='#/include')
</example>

The directory look-up can also be forced using the 
&Dir;()
function:

<example>
include = Dir('include')
env = Environment(CPPPATH=include)
</example>

The directory list will be added to command lines
through the automatically-generated
&cv-_CPPINCFLAGS;
construction variable,
which is constructed by
appending the values of the
&cv-INCPREFIX; and &cv-INCSUFFIX;
construction variables
to the beginning and end
of each directory in &cv-CPPPATH;.
Any command lines you define that need
the CPPPATH directory list should
include &cv-_CPPINCFLAGS;:

<example>
env = Environment(CCCOM="my_compiler $_CPPINCFLAGS -c -o $TARGET $SOURCE")
</example>
</summary>
</cvar>

<cvar name="Dir">
<summary>
A function that converts a string
into a Dir instance relative to the target being built. 
</summary>
</cvar>

<cvar name="Dirs">
<summary>
A function that converts a list of strings
into a list of Dir instances relative to the target being built.
</summary>
</cvar>

<cvar name="DSUFFIXES">
<summary>
The list of suffixes of files that will be scanned
for imported D package files.
The default list is:

<example>
['.d']
</example>
</summary>
</cvar>

<cvar name="File">
<summary>
A function that converts a string into a File instance relative to the
target being built. 
</summary>
</cvar>

<cvar name="IDLSUFFIXES">
<summary>
The list of suffixes of files that will be scanned
for IDL implicit dependencies
(#include or import lines).
The default list is:

<example>
[".idl", ".IDL"]
</example>
</summary>
</cvar>

<cvar name="INCPREFIX">
<summary>
The prefix used to specify an include directory on the C compiler command
line.
This will be appended to the beginning of each directory
in the &cv-CPPPATH; and &cv-FORTRANPATH; construction variables
when the &cv-_CPPINCFLAGS; and &cv-_FORTRANINCFLAGS;
variables are automatically generated.
</summary>
</cvar>

<cvar name="INCSUFFIX">
<summary>
The suffix used to specify an include directory on the C compiler command
line.
This will be appended to the end of each directory
in the &cv-CPPPATH; and &cv-FORTRANPATH; construction variables
when the &cv-_CPPINCFLAGS; and &cv-_FORTRANINCFLAGS;
variables are automatically generated.
</summary>
</cvar>

<cvar name="INSTALL">
<summary>
A function to be called to install a file into a
destination file name.
The default function copies the file into the destination
(and sets the destination file's mode and permission bits
to match the source file's).
The function takes the following arguments:

<example>
def install(dest, source, env):
</example>

<varname>dest</varname>
is the path name of the destination file.
<varname>source</varname>
is the path name of the source file.
<varname>env</varname>
is the construction environment
(a dictionary of construction values)
in force for this file installation.
</summary>
</cvar>

<cvar name="_LIBDIRFLAGS">
<summary>
An automatically-generated construction variable
containing the linker command-line options
for specifying directories to be searched for library.
The value of &cv-_LIBDIRFLAGS; is created
by appending &cv-LIBDIRPREFIX; and &cv-LIBDIRSUFFIX;
to the beginning and end
of each directory in &cv-LIBPATH;.
</summary>
</cvar>

<cvar name="LIBDIRPREFIX">
<summary>
The prefix used to specify a library directory on the linker command line.
This will be appended to the beginning of each directory
in the &cv-LIBPATH; construction variable
when the &cv-_LIBDIRFLAGS; variable is automatically generated.
</summary>
</cvar>

<cvar name="LIBDIRSUFFIX">
<summary>
The suffix used to specify a library directory on the linker command line.
This will be appended to the end of each directory
in the &cv-LIBPATH; construction variable
when the &cv-_LIBDIRFLAGS; variable is automatically generated.
</summary>
</cvar>

<cvar name="_LIBFLAGS">
<summary>
An automatically-generated construction variable
containing the linker command-line options
for specifying libraries to be linked with the resulting target.
The value of &cv-_LIBFLAGS; is created
by appending &cv-LIBLINKPREFIX; and &cv-LIBLINKSUFFIX;
to the beginning and end
of each filename in &cv-LIBS;.
</summary>
</cvar>

<cvar name="LIBLINKPREFIX">
<summary>
The prefix used to specify a library to link on the linker command line.
This will be appended to the beginning of each library
in the &cv-LIBS; construction variable
when the &cv-_LIBFLAGS; variable is automatically generated.
</summary>
</cvar>

<cvar name="LIBLINKSUFFIX">
<summary>
The suffix used to specify a library to link on the linker command line.
This will be appended to the end of each library
in the &cv-LIBS; construction variable
when the &cv-_LIBFLAGS; variable is automatically generated.
</summary>
</cvar>

<cvar name="LIBPATH">
<summary>
The list of directories that will be searched for libraries.
The implicit dependency scanner will search these
directories for include files. Don't explicitly put include directory
arguments in &cv-LINKFLAGS; or &cv-SHLINKFLAGS;
because the result will be non-portable
and the directories will not be searched by the dependency scanner. Note:
directory names in LIBPATH will be looked-up relative to the SConscript
directory when they are used in a command. To force 
&scons;
to look-up a directory relative to the root of the source tree use #:

<example>
env = Environment(LIBPATH='#/libs')
</example>

The directory look-up can also be forced using the 
&Dir;()
function:

<example>
libs = Dir('libs')
env = Environment(LIBPATH=libs)
</example>

The directory list will be added to command lines
through the automatically-generated
&cv-_LIBDIRFLAGS;
construction variable,
which is constructed by
appending the values of the
&cv-LIBDIRPREFIX; and &cv-LIBDIRSUFFIX;
construction variables
to the beginning and end
of each directory in &cv-LIBPATH;.
Any command lines you define that need
the LIBPATH directory list should
include &cv-_LIBDIRFLAGS;:

<example>
env = Environment(LINKCOM="my_linker $_LIBDIRFLAGS $_LIBFLAGS -o $TARGET $SOURCE")
</example>
</summary>
</cvar>

<cvar name="LIBS">
<summary>
A list of one or more libraries
that will be linked with
any executable programs
created by this environment.

The library list will be added to command lines
through the automatically-generated
&cv-_LIBFLAGS;
construction variable,
which is constructed by
appending the values of the
&cv-LIBLINKPREFIX; and &cv-LIBLINKSUFFIX;
construction variables
to the beginning and end
of each filename in &cv-LIBS;.
Any command lines you define that need
the LIBS library list should
include &cv-_LIBFLAGS;:

<example>
env = Environment(LINKCOM="my_linker $_LIBDIRFLAGS $_LIBFLAGS -o $TARGET $SOURCE")
</example>

If you add a
File
object to the
&cv-LIBS;
list, the name of that file will be added to
&cv-_LIBFLAGS;,
and thus the link line, as is, without
&cv-LIBLINKPREFIX;
or
&cv-LIBLINKSUFFIX;.
For example:

<example>
env.Append(LIBS=File('/tmp/mylib.so'))
</example>

In all cases, scons will add dependencies from the executable program to
all the libraries in this list.
</summary>
</cvar>

<cvar name="PDFPREFIX">
<summary>
The prefix used for PDF file names.
</summary>
</cvar>

<cvar name="PDFSUFFIX">
<summary>
The suffix used for PDF file names.
</summary>
</cvar>

<cvar name="RDirs">
<summary>
A function that converts a string into a list of Dir instances by
searching the repositories. 
</summary>
</cvar>