summaryrefslogtreecommitdiff
path: root/src/engine/SCons/Tool/swig.xml
blob: 65a5971fae4fb066eaef8086cff09f3c44b50fb3 (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
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2001 - 2019 The SCons Foundation

This file is processed by the bin/SConsDoc.py module.
See its __doc__ string for a discussion of the format.
-->

<!DOCTYPE sconsdoc [
<!ENTITY % scons SYSTEM '../../../../doc/scons.mod'>
%scons;
<!ENTITY % builders-mod SYSTEM '../../../../doc/generated/builders.mod'>
%builders-mod;
<!ENTITY % functions-mod SYSTEM '../../../../doc/generated/functions.mod'>
%functions-mod;
<!ENTITY % tools-mod SYSTEM '../../../../doc/generated/tools.mod'>
%tools-mod;
<!ENTITY % variables-mod SYSTEM '../../../../doc/generated/variables.mod'>
%variables-mod;
]>

<sconsdoc xmlns="http://www.scons.org/dbxsd/v1.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 http://www.scons.org/dbxsd/v1.0/scons.xsd">

<tool name="swig">
<summary>
<para>
Sets construction variables for the SWIG interface generator.
</para>
</summary>
<sets>
<item>SWIG</item>
<item>SWIGFLAGS</item>
<item>SWIGDIRECTORSUFFIX</item>
<item>SWIGCFILESUFFIX</item>
<item>SWIGCXXFILESUFFIX</item>
<item>_SWIGINCFLAGS</item>
<item>SWIGINCPREFIX</item>
<item>SWIGINCSUFFIX</item>
<item>SWIGCOM</item>
<item>SWIGPATH</item>
<item>SWIGVERSION</item>
</sets>
<uses>
<item>SWIGCOMSTR</item>
</uses>
</tool>

<cvar name="SWIG">
<summary>
<para>
The scripting language wrapper and interface generator.
</para>
</summary>
</cvar>

<cvar name="SWIGCFILESUFFIX">
<summary>
<para>
The suffix that will be used for intermediate C
source files generated by
the scripting language wrapper and interface generator.
The default value is
<filename>_wrap</filename>&cv-link-CFILESUFFIX;.
By default, this value is used whenever the
<option>-c++</option>
option is
<emphasis>not</emphasis>
specified as part of the
&cv-link-SWIGFLAGS;
construction variable.
</para>
</summary>
</cvar>

<cvar name="SWIGDIRECTORSUFFIX">
<summary>
<para>
The suffix that will be used for intermediate C++ header
files generated by the scripting language wrapper and interface generator.
These are only generated for C++ code when the SWIG 'directors' feature is
turned on.
The default value is
<filename>_wrap.h</filename>.
</para>
</summary>
</cvar>

<cvar name="SWIGCOM">
<summary>
<para>
The command line used to call
the scripting language wrapper and interface generator.
</para>
</summary>
</cvar>

<cvar name="SWIGCOMSTR">
<summary>
<para>
The string displayed when calling
the scripting language wrapper and interface generator.
If this is not set, then &cv-link-SWIGCOM; (the command line) is displayed.
</para>
</summary>
</cvar>

<cvar name="SWIGCXXFILESUFFIX">
<summary>
<para>
The suffix that will be used for intermediate C++
source files generated by
the scripting language wrapper and interface generator.
The default value is
<filename>_wrap</filename>&cv-link-CFILESUFFIX;.
By default, this value is used whenever the
<filename>-c++</filename>
option is specified as part of the
&cv-link-SWIGFLAGS;
construction variable.
</para>
</summary>
</cvar>

<cvar name="SWIGFLAGS">
<summary>
<para>
General options passed to
the scripting language wrapper and interface generator.
This is where you should set
<option>-python</option>,
<option>-perl5</option>,
<option>-tcl</option>,
or whatever other options you want to specify to SWIG.
If you set the
<option>-c++</option>
option in this variable,
&scons;
will, by default,
generate a C++ intermediate source file
with the extension that is specified as the
&cv-link-CXXFILESUFFIX;
variable.
</para>
</summary>
</cvar>

<cvar name="_SWIGINCFLAGS">
<summary>
<para>
An automatically-generated construction variable
containing the SWIG command-line options
for specifying directories to be searched for included files.
The value of &cv-_SWIGINCFLAGS; is created
by respectively prepending and appending
&cv-SWIGINCPREFIX; and &cv-SWIGINCSUFFIX;
to the beginning and end
of each directory in &cv-SWIGPATH;.
</para>
</summary>
</cvar>

<cvar name="SWIGINCPREFIX">
<summary>
<para>
The prefix used to specify an include directory on the SWIG command line.
This will be prepended to the beginning of each directory
in the &cv-SWIGPATH; construction variable
when the &cv-_SWIGINCFLAGS; variable is automatically generated.
</para>
</summary>
</cvar>

<cvar name="SWIGINCSUFFIX">
<summary>
<para>
The suffix used to specify an include directory on the SWIG command line.
This will be appended to the end of each directory
in the &cv-SWIGPATH; construction variable
when the &cv-_SWIGINCFLAGS; variable is automatically generated.
</para>
</summary>
</cvar>

<cvar name="SWIGOUTDIR">
<summary>
<para>
Specifies the output directory in which
the scripting language wrapper and interface generator
should place generated language-specific files.
This will be used by SCons to identify
the files that will be generated by the &swig; call,
and translated into the
<literal>swig -outdir</literal> option on the command line.
</para>
</summary>
</cvar>

<cvar name="SWIGPATH">
<summary>
<para>
The list of directories that the scripting language wrapper
and interface generate will search for included files.
The SWIG implicit dependency scanner will search these
directories for include files. The default value is an empty list.
</para>

<para>
Don't explicitly put include directory
arguments in SWIGFLAGS;
the result will be non-portable
and the directories will not be searched by the dependency scanner.
Note: directory names in SWIGPATH 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 #:
</para>

<example_commands>
env = Environment(SWIGPATH='#/include')
</example_commands>

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

<example_commands>
include = Dir('include')
env = Environment(SWIGPATH=include)
</example_commands>

<para>
The directory list will be added to command lines
through the automatically-generated
&cv-_SWIGINCFLAGS;
construction variable,
which is constructed by
respectively prepending and appending the values of the
&cv-SWIGINCPREFIX; and &cv-SWIGINCSUFFIX;
construction variables
to the beginning and end
of each directory in &cv-SWIGPATH;.
Any command lines you define that need
the SWIGPATH directory list should
include &cv-_SWIGINCFLAGS;:
</para>

<example_commands>
env = Environment(SWIGCOM="my_swig -o $TARGET $_SWIGINCFLAGS $SOURCES")
</example_commands>
</summary>
</cvar>

<cvar name="SWIGVERSION">
<summary>
<para>
The version number of the SWIG tool.
</para>
</summary>
</cvar>

</sconsdoc>