Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 37 additions & 44 deletions SCons/Tool/swig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ See its __doc__ string for a discussion of the format.
<tool name="swig">
<summary>
<para>
Sets construction variables for the SWIG interface generator.
Sets construction variables for the &swig; interface compiler.
</para>
</summary>
<sets>
Expand All @@ -50,7 +50,7 @@ Sets construction variables for the SWIG interface generator.
<cvar name="SWIG">
<summary>
<para>
The scripting language wrapper and interface generator.
The name of the &swig; compiler to use.
</para>
</summary>
</cvar>
Expand All @@ -59,10 +59,11 @@ The scripting language wrapper and interface generator.
<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;.
source files generated by &swig;.
The default value is <literal>'_wrap$CFILESUFFIX'</literal> -
that is, the concatenation of the string
<literal>_wrap</literal>
and the current C suffix &cv-link-CFILESUFFIX;.
By default, this value is used whenever the
<option>-c++</option>
option is
Expand All @@ -78,8 +79,8 @@ construction variable.
<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
files generated by &swig;.
These are only generated for C++ code when the &swig; 'directors' feature is
turned on.
The default value is
<filename>_wrap.h</filename>.
Expand All @@ -90,17 +91,15 @@ The default value is
<cvar name="SWIGCOM">
<summary>
<para>
The command line used to call
the scripting language wrapper and interface generator.
The command line used to call &swig;.
</para>
</summary>
</cvar>

<cvar name="SWIGCOMSTR">
<summary>
<para>
The string displayed when calling
the scripting language wrapper and interface generator.
The string displayed when calling &swig;.
If this is not set, then &cv-link-SWIGCOM; (the command line) is displayed.
</para>
</summary>
Expand All @@ -110,12 +109,13 @@ If this is not set, then &cv-link-SWIGCOM; (the command line) is displayed.
<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;.
source files generated by &swig;.
The default value is <literal>'_wrap$CXXFILESUFFIX'</literal> -
that is, the concatenation of the string
<literal>_wrap</literal>
and the current C++ suffix &cv-link-CXXFILESUFFIX;.
By default, this value is used whenever the
<filename>-c++</filename>
<option>-c++</option>
option is specified as part of the
&cv-link-SWIGFLAGS;
construction variable.
Expand All @@ -126,22 +126,14 @@ construction variable.
<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>,
General options passed to &swig;.
This is where you should set the target language
(<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.
<option>-tcl</option>, etc.)
and whatever other options you want to specify to &swig;,
such as the <option>-c++</option> to generate C++ code
instead of C Code.
</para>
</summary>
</cvar>
Expand All @@ -150,7 +142,7 @@ variable.
<summary>
<para>
An automatically-generated construction variable
containing the SWIG command-line options
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
Expand All @@ -164,7 +156,7 @@ of each directory in &cv-SWIGPATH;.
<cvar name="SWIGINCPREFIX">
<summary>
<para>
The prefix used to specify an include directory on the SWIG command line.
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.
Expand All @@ -175,7 +167,7 @@ when the &cv-_SWIGINCFLAGS; variable is automatically generated.
<cvar name="SWIGINCSUFFIX">
<summary>
<para>
The suffix used to specify an include directory on the SWIG command line.
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.
Expand All @@ -186,8 +178,7 @@ when the &cv-_SWIGINCFLAGS; variable is automatically generated.
<cvar name="SWIGOUTDIR">
<summary>
<para>
Specifies the output directory in which
the scripting language wrapper and interface generator
Specifies the output directory in which &swig;
should place generated language-specific files.
This will be used by SCons to identify
the files that will be generated by the &swig; call,
Expand All @@ -200,22 +191,24 @@ and translated into the
<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
The list of directories that &swig;
will search for included files.
&SCons;' 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;
arguments in &cv-link-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
Note: directory names in &cv-link-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 #:
to look-up a directory relative to the root of the source tree use
a top-relative path (<literal>#</literal>):
</para>

<example_commands>
Expand Down Expand Up @@ -258,7 +251,7 @@ env = Environment(SWIGCOM="my_swig -o $TARGET $_SWIGINCFLAGS $SOURCES")
<cvar name="SWIGVERSION">
<summary>
<para>
The version number of the SWIG tool.
The detected version string of the &swig; tool.
</para>
</summary>
</cvar>
Expand Down
2 changes: 1 addition & 1 deletion doc/scons.mod
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<!ENTITY rmic "<application xmlns='http://www.scons.org/dbxsd/v1.0'>rmic</application>">
<!ENTITY ScCons "<application xmlns='http://www.scons.org/dbxsd/v1.0'>ScCons</application>">
<!ENTITY sleep "<application xmlns='http://www.scons.org/dbxsd/v1.0'>sleep</application>">
<!ENTITY swig "<application xmlns='http://www.scons.org/dbxsd/v1.0'>swig</application>">
<!ENTITY swig "<application xmlns='http://www.scons.org/dbxsd/v1.0'>SWIG</application>">
<!ENTITY tar "<application xmlns='http://www.scons.org/dbxsd/v1.0'>tar</application>">
<!ENTITY tex "<application xmlns='http://www.scons.org/dbxsd/v1.0'>tex</application>">
<!ENTITY touch "<application xmlns='http://www.scons.org/dbxsd/v1.0'>touch</application>">
Expand Down