From a2b8a644462f849b78aca6a5590a5f264a8a123a Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Mon, 17 Jan 2022 09:31:55 -0700 Subject: Tweak the swig tool documentation [skip appveyor] Minor changes: the spelled-out name of the tool as used in SCons docs was not the same as the manpage uses, and it was repeated a bunch of times spelled out for no good reason. Just turned it all into uses of &swig; entity. A bit of tweaking of some of the entries. SWIGCXXFILESUFFIX had a copy-paste error, it referred to CFILESUFFIX instead of CXXFILESUFFIX. Signed-off-by: Mats Wichmann --- SCons/Tool/swig.xml | 77 +++++++++++++++++++++++------------------------------ doc/scons.mod | 2 +- 2 files changed, 35 insertions(+), 44 deletions(-) diff --git a/SCons/Tool/swig.xml b/SCons/Tool/swig.xml index 19ec21f..0e3e5c0 100644 --- a/SCons/Tool/swig.xml +++ b/SCons/Tool/swig.xml @@ -26,7 +26,7 @@ See its __doc__ string for a discussion of the format. -Sets construction variables for the SWIG interface generator. +Sets construction variables for the &swig; interface compiler. @@ -50,7 +50,7 @@ Sets construction variables for the SWIG interface generator. -The scripting language wrapper and interface generator. +The name of the &swig; compiler to use. @@ -59,10 +59,11 @@ The scripting language wrapper and interface generator. The suffix that will be used for intermediate C -source files generated by -the scripting language wrapper and interface generator. -The default value is -_wrap&cv-link-CFILESUFFIX;. +source files generated by &swig;. +The default value is '_wrap$CFILESUFFIX' - +that is, the concatenation of the string +_wrap +and the platform's C suffix &cv-link-CFILESUFFIX;. By default, this value is used whenever the option is @@ -78,8 +79,8 @@ construction variable. 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 _wrap.h. @@ -90,8 +91,7 @@ The default value is -The command line used to call -the scripting language wrapper and interface generator. +The command line used to call &swig;. @@ -99,8 +99,7 @@ the scripting language wrapper and interface generator. -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. @@ -110,10 +109,11 @@ If this is not set, then &cv-link-SWIGCOM; (the command line) is displayed. The suffix that will be used for intermediate C++ -source files generated by -the scripting language wrapper and interface generator. -The default value is -_wrap&cv-link-CFILESUFFIX;. +source files generated by &swig;. +The default value is '_wrap$CXXFILESUFFIX' - +that is, the concatenation of the string +_wrap +and the platform's C++ suffix &cv-link-CXXFILESUFFIX;. By default, this value is used whenever the -c++ option is specified as part of the @@ -126,22 +126,12 @@ construction variable. -General options passed to -the scripting language wrapper and interface generator. -This is where you should set -, +General options passed to &swig;. +This is where you should set the target language +(, , -, -or whatever other options you want to specify to SWIG. -If you set the - -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. +, etc.) +and whatever other options you want to specify to &swig;. @@ -150,7 +140,7 @@ variable. 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 @@ -164,7 +154,7 @@ of each directory in &cv-SWIGPATH;. -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. @@ -175,7 +165,7 @@ when the &cv-_SWIGINCFLAGS; variable is automatically generated. -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. @@ -186,8 +176,7 @@ when the &cv-_SWIGINCFLAGS; variable is automatically generated. -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, @@ -200,22 +189,24 @@ and translated into the -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. 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 (#): @@ -258,7 +249,7 @@ env = Environment(SWIGCOM="my_swig -o $TARGET $_SWIGINCFLAGS $SOURCES") -The version number of the SWIG tool. +The detected version string of the &swig; tool. diff --git a/doc/scons.mod b/doc/scons.mod index 8a6df17..4c5dc14 100644 --- a/doc/scons.mod +++ b/doc/scons.mod @@ -84,7 +84,7 @@ rmic"> ScCons"> sleep"> -swig"> +SWIG"> tar"> tex"> touch"> -- cgit v0.12 From 2c58bff119cfc9bdc591df8bca1b397a82b28b8f Mon Sep 17 00:00:00 2001 From: Mats Wichmann Date: Wed, 25 May 2022 07:00:22 -0600 Subject: Fix review comments. [skip appveyor] Signed-off-by: Mats Wichmann --- SCons/Tool/swig.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/SCons/Tool/swig.xml b/SCons/Tool/swig.xml index 0e3e5c0..a6d85ce 100644 --- a/SCons/Tool/swig.xml +++ b/SCons/Tool/swig.xml @@ -63,7 +63,7 @@ source files generated by &swig;. The default value is '_wrap$CFILESUFFIX' - that is, the concatenation of the string _wrap -and the platform's C suffix &cv-link-CFILESUFFIX;. +and the current C suffix &cv-link-CFILESUFFIX;. By default, this value is used whenever the option is @@ -113,9 +113,9 @@ source files generated by &swig;. The default value is '_wrap$CXXFILESUFFIX' - that is, the concatenation of the string _wrap -and the platform's C++ suffix &cv-link-CXXFILESUFFIX;. +and the current C++ suffix &cv-link-CXXFILESUFFIX;. By default, this value is used whenever the --c++ + option is specified as part of the &cv-link-SWIGFLAGS; construction variable. @@ -131,7 +131,9 @@ This is where you should set the target language (, , , etc.) -and whatever other options you want to specify to &swig;. +and whatever other options you want to specify to &swig;, +such as the to generate C++ code +instead of C Code. -- cgit v0.12