Scilab command line options
Document the options. Make scilab -help consistent with the other target languages.
This commit is contained in:
parent
cf077090d3
commit
6e36208928
2 changed files with 57 additions and 9 deletions
|
|
@ -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 <opt></td>
|
||||
<td>Additional include options <opt> to include in build script</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>-addldflag <opt></td>
|
||||
<td>Additional link options <opt> to include in build script</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>-addsrc <files></td>
|
||||
<td>Additional space separated source <files> to include in build script</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>-vbl <level></td>
|
||||
<td>Sets the build verbose <level> (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>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue