Scilab: return exit code 1 from Scilab when module build fails (for Travis test-suite status)

This commit is contained in:
Simon Marchetto 2013-09-04 17:42:19 +02:00
commit 08b779aee2

View file

@ -210,12 +210,17 @@ public:
/* Write all to the builder.sce file */
Printf(builderCode, "];\n");
Printf(builderCode, "ret = 1;\n");
Printf(builderCode, "if ~isempty(table) then\n");
Printf(builderCode, " ilib_build(ilib_name, table, files, libs, [], ldflags, cflags);\n");
Printf(builderCode, " libfilename = 'lib' + ilib_name + getdynlibext();\n");
Printf(builderCode, " if isfile(libfilename) & isfile('loader.sce') then\n");
Printf(builderCode, " ret = 0;\n");
Printf(builderCode, " end\n");
Printf(builderCode, "end\n");
Printf(builderCode, "cd(originaldir);\n");
Printf(builderCode, "exit");
Printf(builderCode, "exit(ret)");
builderFile = NewFile(NewStringf("%sbuilder.sce", SWIG_output_directory()), "w", SWIG_output_files());
Printv(builderFile, builderCode, NIL);
Delete(builderFile);