diff --git a/Doc/Manual/Scilab.html b/Doc/Manual/Scilab.html
index 84c42600b..6916c0d6c 100644
--- a/Doc/Manual/Scilab.html
+++ b/Doc/Manual/Scilab.html
@@ -256,33 +256,38 @@ The following table lists the Scilab specific command line options in addition t
-| -addcflags <cflags> |
-Add compiler flags <cflags> |
+-builder |
+Generate the Scilab builder script (default) |
-| -addldflags <ldflags> |
-Add linker flags <ldflags> |
+-buildercflags <cflags> |
+Add <cflags> to the builder compiler flags |
-| -addsources <files> |
-Add comma separated source files <files> |
+-builderldflags <ldflags> |
+Add <ldlags> to the builder linker flags |
-| -buildverbositylevel <level> |
-Set the build verbosity <level> (default 0) |
+-buildersources <files> |
+Add the (comma separated) files <files> to the builder sources |
-| -buildflags <file> |
-Use the Scilab script <file> to set build flags |
+-builderverbositylevel <level> |
+Set the build verbosity level to <level> (default 0) |
+
+
+
+| -builderflagscript <file> |
+Use the Scilab script <file> to configure the compiler and linker flags |
| -nobuilder |
-Do not generate builder script |
+Do not generate the Scilab builder script |
@@ -305,9 +310,9 @@ Some examples:
-$ swig -scilab -addcflags -I/usr/includes example.i
-$ swig -scilab -addldflags "-lm example.i"
-$ swig -scilab -addsources file1.cxx,file2.cxx,example.i
+$ swig -scilab -buildercflags -I/usr/includes example.i
+$ swig -scilab -builderldflags "-lm example.i"
+$ swig -scilab -buildersources file1.cxx,file2.cxx,example.i
@@ -1859,9 +1864,9 @@ To generate the code and the builder script, the following options may be used w
-- addsources: to add source files to build with
-- addcflags: to add compiler flags (to set header include paths....)
-- addldflags: to add linker flags (to set library paths and names...)
+- buildersources: to add sources to the sources to the builder sources
+- buildercflags: to add compiler flags to the builder (to add include paths, for example)
+- builderldflags: to add linker flags to the builder (to add library dependencies, for example)
@@ -1869,7 +1874,7 @@ The SWIG command to use may be something like this:
-swig -scilab -addcflags "-I[inc_path]..." -addsources [source],... -addldflags "-L[lib_path] -l[lib_name]" [module_name].i
+swig -scilab -buildercflags "-I[inc_path]..." -buildersources [source],... -builderldflags "-L[lib_path] -l[lib_name]" [module_name].i
37.5.4 Builder script
diff --git a/Source/Modules/scilab.cxx b/Source/Modules/scilab.cxx
index 9968ee504..57d64981a 100644
--- a/Source/Modules/scilab.cxx
+++ b/Source/Modules/scilab.cxx
@@ -19,15 +19,17 @@
#define SCILAB_VARIABLE_NAME_CHAR_MAX SCILAB_IDENTIFIER_NAME_CHAR_MAX - 4
-static const char *usage = (char *) "\
-Scilab options (available with -scilab)\n\
- -addcflags - Add compiler flags \n\
- -addldflags - Add linker flags \n\
- -addsources - Add comma separated source files \n\
- -buildflags - Use the Scilab script to set build flags\n\
- -buildverbositylevel - Set the build verbosity (default 0)\n\
- -gatewayxml - Generate gateway xml with the given \n\
- -nobuilder - Do not generate builder script\n\n";
+static const char *usage = (char *) " \
+Scilab options (available with -scilab)\n \
+ -builder - Generate a Scilab builder script (default)\n \
+ -buildercflags - Add to the builder compiler flags\n \
+ -builderldflags - Add to the builder linker flags\n \
+ -buildersources - Add the (comma separated) files to the builder sources\n \
+ -builderflagscript - Set the Scilab script to use by builder to configure the build flags\n \
+ -builderverbositylevel - Set the builder verbosity level to (default 0)\n \
+ -nobuilder - Do not generate the Scilab builder script\n \
+ -gatewayxml - Generate gateway xml with the given \n\n";
+
class SCILAB:public Language {
protected:
@@ -100,7 +102,12 @@ public:
if (argv[argIndex] != NULL) {
if (strcmp(argv[argIndex], "-help") == 0) {
Printf(stdout, "%s\n", usage);
- } else if (strcmp(argv[argIndex], "-addsources") == 0) {
+ } else if (strcmp(argv[argIndex], "-builder") == 0) {
+ Swig_mark_arg(argIndex);
+ generateBuilder = true;
+ createGatewaySource = false;
+ createLoader = false;
+ } else if (strcmp(argv[argIndex], "-buildersources") == 0) {
if (argv[argIndex + 1] != NULL) {
Swig_mark_arg(argIndex);
char *sourceFile = strtok(argv[argIndex + 1], ",");
@@ -110,23 +117,23 @@ public:
}
Swig_mark_arg(argIndex + 1);
}
- } else if (strcmp(argv[argIndex], "-addcflags") == 0) {
+ } else if (strcmp(argv[argIndex], "-buildercflags") == 0) {
Swig_mark_arg(argIndex);
if (argv[argIndex + 1] != NULL) {
Insert(cflags, Len(cflags), argv[argIndex + 1]);
Swig_mark_arg(argIndex + 1);
}
- } else if (strcmp(argv[argIndex], "-addldflags") == 0) {
+ } else if (strcmp(argv[argIndex], "-builderldflags") == 0) {
Swig_mark_arg(argIndex);
if (argv[argIndex + 1] != NULL) {
Insert(ldflags, Len(ldflags), argv[argIndex + 1]);
Swig_mark_arg(argIndex + 1);
}
- } else if (strcmp(argv[argIndex], "-buildverbositylevel") == 0) {
+ } else if (strcmp(argv[argIndex], "-builderverbositylevel") == 0) {
Swig_mark_arg(argIndex);
verboseBuildLevel = NewString(argv[argIndex + 1]);
Swig_mark_arg(argIndex + 1);
- } else if (strcmp(argv[argIndex], "-buildflags") == 0) {
+ } else if (strcmp(argv[argIndex], "-builderflagscript") == 0) {
Swig_mark_arg(argIndex);
buildFlagsScript = NewString(argv[argIndex + 1]);
Swig_mark_arg(argIndex + 1);