Scilab command line options

Document the options.
Make scilab -help consistent with the other target languages.
This commit is contained in:
William S Fulton 2013-09-05 19:15:51 +01:00
commit 6e36208928
2 changed files with 57 additions and 9 deletions

View file

@ -144,6 +144,57 @@ ans = 3
--> Foo_get
ans = 4 </pre></div>
<H3><a name="Scilab_options"></a>Additional commandline options</H3>
<p>
The following table list the additional commandline options available for the Scilab module. They can also be seen by using:
</p>
<div class="code"><pre>
swig -scilab -help
</pre></div>
<table summary="Scilab specific options">
<tr>
<th>Scilab specific options</th>
</tr>
<tr>
<td>-addcflag &lt;opt&gt;</td>
<td>Additional include options &lt;opt&gt; to include in build script</td>
</tr>
<tr>
<td>-addldflag &lt;opt&gt;</td>
<td>Additional link options &lt;opt&gt; to include in build script</td>
</tr>
<tr>
<td>-addsrc &lt;files&gt;</td>
<td>Additional space separated source &lt;files&gt; to include in build script</td>
</tr>
<tr>
<td>-vbl &lt;level&gt;</td>
<td>Sets the build verbose &lt;level&gt; (default 0)</td>
</tr>
</table>
<p>
Some examples:
</p>
<div class="shell"><pre>
$ swig -scilab -addcflag -I/usr/includes example.i
$ swig -scilab -addldflag -lm example.i
$ swig -scilab -addsrc file1.cxx file2.cxx example.i
</pre></div>
</p>
<H2><a name="Scilab_tour_of_basic_c"></a>37.3 A tour of basic C wrapping</H2>

View file

@ -17,11 +17,11 @@
/*#define SWIG_DEBUG*/
static const char *usage = (char *) "\
Scilab options\n\
-addsrc <source files> additionnal source files (separated by space) to include in build script (ex: myfile.cxx myfile2.cxx)\n\
-addcflag -I<path> additionnal include path to include in build script (ex: -I/usr/includes/)\n\
-addldlag <flag> additionnal link flag to include in build script (ex: -lm)\n\
-vbl <level> sets the build verbose level (default 0)\n\n";
Scilab options (available with -scilab)\n\
-addcflag <opt> - Additional include options <opt> to include in build script\n\
-addldflag <opt>- Additional link options <opt> to include in build script\n\
-addsrc <files> - Additional space separated source <files> to include in build script\n\
-vbl <level> - Sets the build verbose <level> (default 0)\n\n";
const char *SWIG_INIT_FUNCTION_NAME = "SWIG_Init";
const char *SWIG_CREATE_VARIABLES_FUNCTION_NAME = "SWIG_CreateScilabVariables";
@ -61,10 +61,7 @@ public:
for (int argIndex = 1; argIndex < argc; argIndex++) {
if (argv[argIndex] != NULL) {
if (strcmp(argv[argIndex], "-help") == 0) {
/* Display message */
fputs(usage, stderr);
/* Indicate arg as valid */
Swig_mark_arg(argIndex);
Printf(stdout, "%s\n", usage);
} else if (strcmp(argv[argIndex], "-addsrc") == 0) {
if (argv[argIndex + 1] != NULL) {
Swig_mark_arg(argIndex);