scilab: do not exit Scilab from builder.sce but in makefile
This commit is contained in:
parent
f3b0497d62
commit
298452fc5d
2 changed files with 14 additions and 9 deletions
|
|
@ -1576,7 +1576,7 @@ scilab: $(SRCS)
|
||||||
$(eval $(call get_swig_scilab_args))
|
$(eval $(call get_swig_scilab_args))
|
||||||
$(SWIG) $(SWIGOPT) $(SWIG_SCILAB_ARGS) $(INTERFACEPATH)
|
$(SWIG) $(SWIGOPT) $(SWIG_SCILAB_ARGS) $(INTERFACEPATH)
|
||||||
if [ -f builder.sce ]; then \
|
if [ -f builder.sce ]; then \
|
||||||
env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH MAKEFLAGS="-j1" $(RUNTOOL) $(SCILAB) $(SCILAB_STARTOPT) -f builder.sce; \
|
env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH MAKEFLAGS="-j1" $(RUNTOOL) $(SCILAB) $(SCILAB_STARTOPT) -e "exit(exec('builder.sce', 'errcatch'))"; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
|
|
@ -1587,7 +1587,7 @@ scilab_cpp: $(SRCS)
|
||||||
$(eval $(call get_swig_scilab_args))
|
$(eval $(call get_swig_scilab_args))
|
||||||
$(SWIG) $(SWIGOPT) -c++ $(SWIG_SCILAB_ARGS) $(INTERFACEPATH)
|
$(SWIG) $(SWIGOPT) -c++ $(SWIG_SCILAB_ARGS) $(INTERFACEPATH)
|
||||||
if [ -f builder.sce ]; then \
|
if [ -f builder.sce ]; then \
|
||||||
env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH MAKEFLAGS="-j1" $(RUNTOOL) $(SCILAB) $(SCILAB_STARTOPT) -f builder.sce; \
|
env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH MAKEFLAGS="-j1" $(RUNTOOL) $(SCILAB) $(SCILAB_STARTOPT) -e "exit(exec('builder.sce', 'errcatch'))"; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -761,18 +761,23 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
void terminateBuilderCode() {
|
void terminateBuilderCode() {
|
||||||
|
|
||||||
Printf(builderCode, "];\n");
|
Printf(builderCode, "];\n");
|
||||||
Printf(builderCode, "ret = 1;\n");
|
Printf(builderCode, "err_msg = [];\n");
|
||||||
Printf(builderCode, "if ~isempty(table) then\n");
|
Printf(builderCode, "if ~isempty(table) then\n");
|
||||||
Printf(builderCode, " ilib_build(ilib_name, table, files, libs, [], ldflags, cflags);\n");
|
Printf(builderCode, " ilib_build(ilib_name, table, files, libs, [], ldflags, cflags);\n");
|
||||||
Printf(builderCode, " libfilename = 'lib' + ilib_name + getdynlibext();\n");
|
Printf(builderCode, " libfilename = 'lib' + ilib_name + getdynlibext();\n");
|
||||||
Printf(builderCode, " if isfile(libfilename) & isfile('loader.sce') then\n");
|
Printf(builderCode, " if ~isfile(libfilename) then\n");
|
||||||
Printf(builderCode, " ret = 0;\n");
|
Printf(builderCode, " err_msg = 'Error while building library ' + libfilename ' + '.');\n");
|
||||||
|
Printf(builderCode, " end\n");
|
||||||
|
Printf(builderCode, " if ~isfile('loader.sce') then\n");
|
||||||
|
Printf(builderCode, " err_msg = 'Error while generating loader script loader.sce.');\n");
|
||||||
Printf(builderCode, " end\n");
|
Printf(builderCode, " end\n");
|
||||||
Printf(builderCode, "end\n");
|
Printf(builderCode, "end\n");
|
||||||
Printf(builderCode, "cd(originaldir);\n");
|
Printf(builderCode, "cd(originaldir);\n");
|
||||||
|
Printf(builderCode, "if err_msg <> [] then\n");
|
||||||
Printf(builderCode, "exit(ret)");
|
Printf(builderCode, " error(err_msg, 1);\n");
|
||||||
|
Printf(builderCode, "end\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void saveBuilderFile() {
|
void saveBuilderFile() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue