mirror of https://github.com/swig/swig
73 lines
1.8 KiB
Makefile
73 lines
1.8 KiB
Makefile
#######################################################################
|
|
# Makefile for scilab test-suite
|
|
#######################################################################
|
|
|
|
LANGUAGE = scilab
|
|
SCILAB = @SCILAB@
|
|
SCILAB_STARTOPT = @SCILABSTARTOPT@
|
|
SCRIPTSUFFIX = _runme.sci
|
|
srcdir = $(abspath @srcdir@)
|
|
top_srcdir = $(abspath @top_srcdir@)
|
|
top_builddir = $(abspath @top_builddir@)
|
|
|
|
C_TEST_CASES += \
|
|
scilab_enums \
|
|
scilab_consts \
|
|
|
|
CPP_TEST_CASES += \
|
|
primitive_types \
|
|
inout \
|
|
scilab_li_matrix \
|
|
scilab_pointer_conversion_functions \
|
|
scilab_multivalue \
|
|
overload_arrays \
|
|
|
|
CPP_STD_TEST_CASES += \
|
|
li_std_container_typemaps \
|
|
|
|
TEST_DIR = $*.dir
|
|
RUNME_SCRIPT = $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)
|
|
|
|
include $(srcdir)/../common.mk
|
|
|
|
# Rules for the different types of tests
|
|
%.cpptest:
|
|
$(setup)
|
|
+(cd $(TEST_DIR) && $(swig_and_compile_cpp))
|
|
$(run_testcase)
|
|
|
|
%.ctest:
|
|
$(setup)
|
|
+(cd $(TEST_DIR) && $(swig_and_compile_c))
|
|
$(run_testcase)
|
|
|
|
%.multicpptest:
|
|
$(setup)
|
|
+(cd $(TEST_DIR) && $(swig_and_compile_multi_cpp))
|
|
$(run_testcase)
|
|
|
|
# Makes a directory for the testcase if it does not exist
|
|
setup = \
|
|
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
|
|
echo "$(ACTION)ing testcase $* (with run test) under $(LANGUAGE)" ; \
|
|
else \
|
|
echo "$(ACTION)ing testcase $* under $(LANGUAGE)" ; \
|
|
fi; \
|
|
if [ ! -d $(TEST_DIR) ]; then \
|
|
mkdir $(TEST_DIR); \
|
|
fi
|
|
|
|
# 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 $(RUNME_SCRIPT) ]; then ( \
|
|
env LD_LIBRARY_PATH=$(srcdir)/$(TEST_DIR):$$LD_LIBRARY_PATH $(RUNTOOL) $(SCILAB) $(SCILAB_STARTOPT) -f $(RUNME_SCRIPT); )\
|
|
fi
|
|
|
|
# Clean: remove the generated files
|
|
%.clean:
|
|
@rm -rf $(TEST_DIR)
|
|
|
|
clean:
|
|
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile scilab_clean
|