swig/Examples/test-suite/scilab/Makefile.in
Wolfgang Frisch 15d5d89b2f scilab: Make the build process non-interactive.
When Scilab encounters an error in builder.sce, it leaves the user with
an interactive scilab-cli shell. This is undesirable when executing test
cases.

This patch makes Scilab exit with an error code instead.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-scilab@13148 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-06-04 07:45:30 +00:00

48 lines
1.2 KiB
Makefile

#######################################################################
# Makefile for scilab test-suite
#######################################################################
LANGUAGE = scilab
SCILAB = @SCILAB@
SCRIPTSUFFIX = _runme.sci
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
# Overridden variables here
# None!
# - member_funcptr_galore (C++)
# - member_pointer (C++)
# - typemap_variables (C++)
include $(srcdir)/../common.mk
# Rules for the different types of tests
%.cpptest:
$(setup)
+$(swig_and_compile_cpp)
$(run_testcase)
%.ctest:
$(setup)
+$(swig_and_compile_c)
$(run_testcase)
%.multicpptest:
$(setup)
+$(swig_and_compile_multi_cpp)
$(run_testcase)
# Runs the testcase. A testcase is only run if
# a file is found which has _runme.sci appended after the testcase name.
run_testcase = \
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then ( \
env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) echo 'exit(1)' |$(SCILAB) -nwni -nb -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ; ) \
fi;
# Clean: remove the generated .sci file
%.clean:
@rm -f $*.sci *_wrap.c *.h *_wrap.cxx
clean:
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile scilab_clean