scilab: fix command line option names

This commit is contained in:
Simon Marchetto 2014-06-12 18:07:33 +02:00
commit a531ea2f27
3 changed files with 36 additions and 36 deletions

View file

@ -256,28 +256,28 @@ The following table lists the Scilab specific command line options in addition t
<table summary="Scilab specific options">
<tr>
<td>-addcflag &lt;opt&gt;</td>
<td>Additional compiler options &lt;opt&gt; to include in build script</td>
<td>-addcflags &lt;cflags&gt;</td>
<td>Add compiler flags &lt;cflags&gt;</td>
</tr>
<tr>
<td>-addldflag &lt;opt&gt;</td>
<td>Additional link options &lt;opt&gt; to include in build script</td>
<td>-addldflags &lt;ldflags&gt;</td>
<td>Add linker flags &lt;ldflags&gt;</td>
</tr>
<tr>
<td>-addsrc &lt;files&gt;</td>
<td>Additional comma separated source &lt;files&gt; to include in build script</td>
<td>-addsources &lt;files&gt;</td>
<td>Add comma separated source files &lt;files&gt;</td>
</tr>
<tr>
<td>-vbl &lt;level&gt;</td>
<td>Sets the build verbose &lt;level&gt; (default 0)</td>
<td>-buildverbosity &lt;level&gt;</td>
<td>Set the build verbosity &lt;level&gt; (default 0)</td>
</tr>
<tr>
<td>-buildflags &lt;file&gt;</td>
<td>Uses a Scilab script in &lt;file&gt; to set build flags level</td>
<td>Use the Scilab script &lt;file&gt; to set build flags</td>
</tr>
<tr>
@ -286,12 +286,12 @@ The following table lists the Scilab specific command line options in addition t
</tr>
<tr>
<td>-intmod &lt;gateway id&gt;</td>
<td>-internalmodule &lt;gateway id&gt;</td>
<td>Generate an internal module with the given &lt;gateway id&gt;</td>
</tr>
<tr>
<td>-ol &lt;library name&gt;</td>
<td>-outputlibrary &lt;name&gt;</td>
<td>Set name of the output library</td>
</tr>
@ -311,9 +311,9 @@ 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
$ swig -scilab -addcflags -I/usr/includes example.i
$ swig -scilab -addldflags "-lm example.i"
$ swig -scilab -addsources file1.cxx,file2.cxx,example.i
</pre></div>
</p>
@ -1862,9 +1862,9 @@ To generate the code and the builder script, the following options may be used w
</p>
<ul>
<li><tt><b>addsrc</b></tt>: to add in the compilation source files</li>
<li><tt><b>addcflag</b></tt>: to set the header include paths</li>
<li><tt><b>addldflag</b></tt>: to set the third party library paths and names</li>
<li><tt><b>addsources</b></tt>: to add source files to build with</li>
<li><tt><b>addcflags</b></tt>: to add compiler flags (to set header include paths....)</li>
<li><tt><b>addldflags</b></tt>: to add linker flags (to set library paths and names...)</li>
</ul>
<p>
@ -1872,7 +1872,7 @@ The SWIG command to use may be something like this:
</p>
<div class="shell"><pre>
swig -scilab -addcflag "-I[inc_path]..." -addsrc [source],... -addldflag "-L[lib_path] -l[lib_name]" [module_name].i
swig -scilab -addcflags "-I[inc_path]..." -addsources [source],... -addldflags "-L[lib_path] -l[lib_name]" [module_name].i
</pre></div>
<H3><a name="Scilab_module_builder"></a>37.5.4 Builder script</H3>

View file

@ -1710,13 +1710,13 @@ SCILAB_OPT = @SCILABOPT@
define get_swig_scilab_args
SWIG_SCILAB_ARGS := -scilab
ifdef SRCS
SWIG_SCILAB_ARGS += -addsrc "$(SRCDIR_SRCS)"
SWIG_SCILAB_ARGS += -addsources "$(SRCDIR_SRCS)"
endif
ifdef INCLUDES
SWIG_SCILAB_ARGS += -addcflag "-I$(abspath $(INCLUDES))"
SWIG_SCILAB_ARGS += -addcflags "-I$(abspath $(INCLUDES))"
endif
ifdef SRCDIR
SWIG_SCILAB_ARGS += -addcflag "-I$(abspath $(SRCDIR))"
SWIG_SCILAB_ARGS += -addcflags "-I$(abspath $(SRCDIR))"
endif
endef

View file

@ -17,14 +17,14 @@
static const char *usage = (char *) "\
Scilab options (available with -scilab)\n\
-addcflag <flag> - Additional compilation flag <flag> to include in build script\n\
-addldflag <flag> - Additional link flag <flag> to include in build script\n\
-addsrc <files> - Additional comma separated source <files> to include in build script\n\
-vbl <level> - Sets the build verbose <level> (default 0)\n\
-buildflags <file> - Uses a Scilab script in <file> to set build flags\n\
-nobuilder - Do not generate builder script\n\
-intmod <gateway id> - Generate internal module files with the given <gateway id>\n\
-ol <library name> - Set name of the output library\n\n"
-addcflags <cflags> - Add compiler flags <cflags>\n\
-addldflags <ldflags> - Add linker flags <ldflags>\n\
-addsources <files> - Add comma separated source files <files>\n\
-buildverbositylevel <level> - Set the build verbosity <level> (default 0)\n\
-buildflags <file> - Use the Scilab script <file> to set build flags\n\
-nobuilder - Do not generate builder script\n\
-internalmodule <gateway id> - Generate internal module files with the given <gateway id>\n\
-outputlibrary <name> - Set name of the output library to <name>\n\n"
;
class SCILAB:public Language {
@ -90,7 +90,7 @@ public:
if (argv[argIndex] != NULL) {
if (strcmp(argv[argIndex], "-help") == 0) {
Printf(stdout, "%s\n", usage);
} else if (strcmp(argv[argIndex], "-addsrc") == 0) {
} else if (strcmp(argv[argIndex], "-addsources") == 0) {
if (argv[argIndex + 1] != NULL) {
Swig_mark_arg(argIndex);
char *sourceFile = strtok(argv[argIndex + 1], ",");
@ -100,19 +100,19 @@ public:
}
Swig_mark_arg(argIndex + 1);
}
} else if (strcmp(argv[argIndex], "-addcflag") == 0) {
} else if (strcmp(argv[argIndex], "-addcflags") == 0) {
Swig_mark_arg(argIndex);
if (argv[argIndex + 1] != NULL) {
DohInsertitem(cflags, Len(cflags), argv[argIndex + 1]);
Swig_mark_arg(argIndex + 1);
}
} else if (strcmp(argv[argIndex], "-addldflag") == 0) {
} else if (strcmp(argv[argIndex], "-addldflags") == 0) {
Swig_mark_arg(argIndex);
if (argv[argIndex + 1] != NULL) {
DohInsertitem(ldflags, Len(ldflags), argv[argIndex + 1]);
Swig_mark_arg(argIndex + 1);
}
} else if (strcmp(argv[argIndex], "-vbl") == 0) {
} else if (strcmp(argv[argIndex], "-buildverbositylevel") == 0) {
Swig_mark_arg(argIndex);
verboseBuildLevel = NewString(argv[argIndex + 1]);
Swig_mark_arg(argIndex + 1);
@ -124,14 +124,14 @@ public:
Swig_mark_arg(argIndex);
generateBuilder = false;
}
else if (strcmp(argv[argIndex], "-intmod") == 0) {
else if (strcmp(argv[argIndex], "-internalmodule") == 0) {
Swig_mark_arg(argIndex);
generateBuilder = false;
internalModule = true;
gatewayID = NewString(argv[argIndex + 1]);
Swig_mark_arg(argIndex + 1);
}
else if (strcmp(argv[argIndex], "-ol") == 0) {
else if (strcmp(argv[argIndex], "-outputlibrary") == 0) {
Swig_mark_arg(argIndex);
libraryName = NewString(argv[argIndex + 1]);
Swig_mark_arg(argIndex + 1);
@ -900,7 +900,7 @@ public:
/* -----------------------------------------------------------------------
* createGatewayGenerator()
* Creates a Scilab macro to generate the gateway source (entry point gw_<module>.c)
* Used in the context of internal module generation (-intmod)
* Used in the context of internal module generation (-internalmodule)
* ----------------------------------------------------------------------- */
void createGatewayGeneratorFile() {
String *gatewayGeneratorFilename = NewString("generate_gateway.sce");