swig/Examples/test-suite/c/Makefile.in
Vadim Zeitlin 7a392fd21f Fix typemaps for "void*"
Pass void pointers directly to C, don't handle them objects which was done by
default previously because we didn't define any specific typemaps for them.

This allows to reenable another test.
2016-04-20 18:46:12 +02:00

244 lines
5.9 KiB
Makefile

#######################################################################
# Makefile for C test-suite
#######################################################################
LANGUAGE = c
C = gcc
CXX = g++
SCRIPTSUFFIX = _runme.c
srcdir = @srcdir@
top_srcdir = ../@top_srcdir@
top_builddir = ../@top_builddir@
CPP_TEST_CASES := \
cpp_basic_class \
cpp_basic_class_method \
cpp_basic_class_virtual_method \
cpp_basic_class_var_pub_member_built_in \
cpp_basic_class_var_pub_member_class \
cpp_basic_global_var_built_in \
cpp_basic_global_var_class \
cpp_basic_namespaced_class \
cpp_basic_template_function \
cpp_basic_template_class \
c_backend_cpp_natural_std_string \
c_backend_cpp_exception
# The following tests are currently broken and need to be fixed.
FAILING_C_TESTS := \
arrays \
enum_missing \
funcptr \
function_typedef \
lextype \
li_carrays \
li_cdata \
li_constraints \
li_cpointer \
memberin_extend_c \
nested \
nested_extend_c \
nested_structs \
overload_extend2 \
overload_extend_c \
typedef_struct \
union_parameter \
unions \
FAILING_CPP_TESTS := \
abstract_typedef \
abstract_typedef2 \
anonymous_bitfield \
apply_signed_char \
apply_strings \
argout \
array_member \
array_typedef_memberin \
arrayref \
arrays_dimensionless \
arrays_global \
arrays_global_twodim \
char_binary \
char_strings \
class_ignore \
class_scope_weird \
constant_pointers \
cpp_basic \
cpp_basic_class_var_pub_member_built_in \
cpp_basic_global_var_built_in \
cpp_basic_template_class \
cpp_basic_template_function \
cpp_namespace \
cpp_typedef \
c_backend_cpp_natural_std_string \
c_backend_cpp_exception \
default_arg_values \
default_args \
default_constructor \
derived_nested \
director_basic \
director_binary_string \
director_enum \
director_frob \
director_property \
director_string \
enum_thorough \
enum_var \
exception_order \
extend \
extend_constructor_destructor \
extend_default \
extend_placement \
extern_c \
features \
friends_template \
funcptr_cpp \
global_scope_types \
global_vars \
grouping \
import_nomodule \
inherit_missing \
kind \
langobj \
li_attribute \
li_attribute_template \
li_boost_shared_ptr \
li_boost_shared_ptr_bits \
li_carrays_cpp \
li_cdata_cpp \
li_std_combinations \
li_std_deque \
li_std_map \
li_std_pair \
li_std_pair_using \
li_std_string \
li_std_vector \
li_swigtype_inout \
li_windows \
long_long_apply \
member_funcptr_galore \
member_pointer \
mixed_types \
multiple_inheritance_shared_ptr \
namespace_class \
namespace_typemap \
namespace_virtual_method \
naturalvar \
naturalvar_more \
nested_class \
nested_scope \
nested_template_base \
operator_overload \
overload_arrays \
overload_polymorphic \
primitive_ref \
refcount \
reference_global_vars \
register_par \
smart_pointer_extend \
smart_pointer_not \
smart_pointer_template_defaults_overload \
special_variables \
struct_initialization_cpp \
template_arg_scope \
template_arg_typename \
template_basic \
template_default \
template_default_arg \
template_default_class_parms_typedef \
template_default_vw \
template_enum \
template_explicit \
template_extend_overload \
template_forward \
template_nested \
template_ns2 \
template_ns4 \
template_ns_enum \
template_ns_enum2 \
template_opaque \
template_retvalue \
template_tbase_template \
template_typedef \
template_typedef_class_template \
template_typedef_cplx \
template_typedef_cplx2 \
template_typedef_cplx3 \
template_typedef_cplx4 \
template_typedef_cplx5 \
template_typedef_fnc \
template_typedef_funcptr \
template_typemaps \
template_typemaps_typedef \
template_typemaps_typedef2 \
template_using_directive_and_declaration_forward \
template_whitespace \
typedef_array_member \
typedef_funcptr \
typedef_struct_cpp \
typemap_array_qualifiers \
typemap_namespace \
typemap_template_parm_typedef \
typemap_variables \
typemap_various \
using_extend \
valuewrapper_opaque \
varargs \
varargs_overload \
virtual_poly \
voidtest
FAILING_MULTI_CPP_TESTS := \
clientdata_prop \
imports \
import_stl \
mod \
template_typedef_import \
include $(srcdir)/../common.mk
SRCDIR = ../$(srcdir)/
# Rules for the different types of tests
%.cpptest:
$(setup)
+(cd $* && $(swig_and_compile_cpp))
$(run_testcase)
%.ctest:
$(setup)
+(cd $* && $(swig_and_compile_c))
$(run_testcase)
%.multicpptest:
$(setup)
+(cd $* && $(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 $* ]; then \
mkdir $*; \
fi;
# Compiles C files then runs the testcase. A testcase is only run if
# a file is found which has _runme.c appended after the testcase name.
run_testcase = \
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then (\
cd $* && $(COMPILETOOL) $(CC) ../$(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) -I.. -L. -l$* -o $*_runme && \
env LD_LIBRARY_PATH=".:$$LD_LIBRARY_PATH" PATH=".:$$PATH" SHLIB_PATH=".:$$SHLIB_PATH" DYLD_LIBRARY_PATH=".:$$DYLD_LIBRARY_PATH" $(RUNTOOL) ./$*_runme;) \
fi;
# Clean: remove testcase directories
%.clean:
@if [ -d $* ]; then \
rm -rf $*; \
fi;
clean:
@rm -f *_wrap.* *~ *.exe *.dll *.so *.out *runme