1#######################################################################
2# SWIG test suite makefile.
3# The test suite comprises many different test cases, which have
4# typically produced bugs in the past. The aim is to have the test
5# cases compiling for every language modules. Some testcase have
6# a runtime test which is written in each of the module's language.
7#
8# This makefile runs SWIG on the testcases, compiles the c/c++ code
9# then builds the object code for use by the language.
10# To complete a test in a language follow these guidelines:
11# 1) Add testcases to CPP_TEST_CASES (c++) or C_TEST_CASES (c) or
12#    MULTI_CPP_TEST_CASES (multi-module c++ tests)
13# 2) If not already done, create a makefile which:
14#    a) Defines LANGUAGE matching a language rule in Examples/Makefile,
15#       for example LANGUAGE = java
16#    b) Define rules for %.ctest, %.cpptest, %.multicpptest and %.clean.
17#    c) Define srcdir, top_srcdir and top_builddir (these are the
18#       equivalent to configure's variables of the same name).
19# 3) One off special commandline options for a testcase can be added.
20#    See custom tests below.
21#
22# The 'check' target runs the testcases including SWIG invocation,
23# C/C++ compilation, target language compilation (if any) and runtime
24# test (if there is an associated 'runme' test).
25# The 'partialcheck' target only invokes SWIG.
26# The 'all' target is the same as the 'check' target but also includes
27# known broken testcases.
28# The 'clean' target cleans up.
29#
30# Note that the RUNTOOL, COMPILETOOL and SWIGTOOL variables can be used
31# for invoking tools for the runtime tests and target language
32# compiler (eg javac), and on SWIG respectively. For example, valgrind
33# can be used for memory checking of the runtime tests using:
34#   make RUNTOOL="valgrind --leak-check=full"
35# and valgrind can be used when invoking SWIG using:
36#   make SWIGTOOL="valgrind --tool=memcheck"
37#
38# An individual test run can be debugged easily:
39#   make director_string.cpptest RUNTOOL="gdb --args"
40#
41# The variables below can be overridden after including this makefile
42#######################################################################
43
44#######################################################################
45# Variables
46#######################################################################
47
48ifneq (,$(USE_VALGRIND))
49VALGRIND_OPT = --leak-check=full
50RUNTOOL    = valgrind $(VALGRIND_OPT)
51else
52RUNTOOL    =
53endif
54COMPILETOOL=
55SWIGTOOL   =
56
57SWIGEXE   = $(top_builddir)/swig
58SWIG_LIB_DIR = $(top_srcdir)/Lib
59TEST_SUITE = test-suite
60EXAMPLES   = Examples
61CXXSRCS    =
62CSRCS      =
63TARGETPREFIX =
64TARGETSUFFIX =
65SWIGOPT    = -outcurrentdir -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)
66INCLUDES   = -I$(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)
67LIBS       = -L.
68LIBPREFIX  = lib
69ACTION     = check
70INTERFACEDIR = ../
71SRCDIR     = $(srcdir)/
72SCRIPTDIR  = $(srcdir)
73
74# Regenerate Makefile if Makefile.in or config.status have changed.
75Makefile: $(srcdir)/Makefile.in ../../../config.status
76	cd ../../../ && $(SHELL) ./config.status $(EXAMPLES)/$(TEST_SUITE)/$(LANGUAGE)/Makefile
77
78#
79# Please keep test cases in alphabetical order.
80# Note that any whitespace after the last entry in each list will break make
81#
82
83# Broken C++ test cases. (Can be run individually using: make testcase.cpptest)
84CPP_TEST_BROKEN += \
85	constants \
86	director_nested_class \
87	exception_partial_info \
88	extend_variable \
89	li_boost_shared_ptr_template \
90	nested_private \
91	rename_camel \
92	template_default_pointer \
93	template_private_assignment \
94	template_expr \
95	$(CPP11_TEST_BROKEN)
96
97
98# Broken C test cases. (Can be run individually using: make testcase.ctest)
99C_TEST_BROKEN += \
100	tag_no_clash_with_variable \
101
102# C++ test cases. (Can be run individually using: make testcase.cpptest)
103CPP_TEST_CASES += \
104	abstract_access \
105	abstract_inherit \
106	abstract_inherit_ok \
107	abstract_signature \
108	abstract_typedef \
109	abstract_typedef2 \
110	abstract_virtual \
111	access_change \
112	add_link \
113	aggregate \
114	allowexcept \
115	allprotected \
116	allprotected_not \
117	anonymous_bitfield \
118	apply_signed_char \
119	apply_strings \
120	argout \
121	array_member \
122	array_typedef_memberin \
123	arrayref \
124	arrays_dimensionless \
125	arrays_global \
126	arrays_global_twodim \
127	arrays_scope \
128	autodoc \
129	bloody_hell \
130	bools \
131	catches \
132	cast_operator \
133	casts \
134	char_binary \
135	char_strings \
136	chartest \
137	class_scope_namespace \
138	class_forward \
139	class_ignore \
140	class_scope_weird \
141	compactdefaultargs \
142	const_const_2 \
143	constant_directive \
144	constant_pointers \
145	constover \
146	constructor_copy \
147	constructor_exception \
148	constructor_explicit \
149	constructor_ignore \
150	constructor_rename \
151	constructor_value \
152	contract \
153	conversion \
154	conversion_namespace \
155	conversion_ns_template \
156	conversion_operators \
157	cplusplus_throw \
158	cpp_basic \
159	cpp_enum \
160	cpp_namespace \
161	cpp_nodefault \
162	cpp_parameters \
163	cpp_static \
164	cpp_typedef \
165	cpp14_binary_integer_literals \
166	cpp17_hex_floating_literals \
167	cpp17_nested_namespaces \
168	cpp17_nspace_nested_namespaces \
169	cpp17_u8_char_literals \
170	curiously_recurring_template_pattern \
171	default_args \
172	default_arg_expressions \
173	default_arg_values \
174	default_constructor \
175	defvalue_constructor \
176	derived_byvalue \
177	derived_nested \
178	destructor_methodmodifiers \
179	destructor_reprotected \
180	director_abstract \
181	director_alternating \
182	director_basic \
183	director_binary_string \
184	director_classes \
185	director_classic \
186	director_constructor \
187	director_conversion_operators \
188	director_default \
189	director_detect \
190	director_enum \
191	director_exception \
192	director_exception_catches \
193	director_exception_nothrow \
194	director_extend \
195	director_finalizer \
196	director_frob \
197	director_ignore \
198	director_keywords \
199	director_namespace_clash \
200	director_nested \
201	director_nspace \
202	director_nspace_director_name_collision \
203	director_overload \
204	director_overload2 \
205	director_ownership \
206	director_pass_by_value \
207	director_primitives \
208	director_property \
209	director_protected \
210	director_protected_overloaded \
211	director_redefined \
212	director_ref \
213	director_smartptr \
214	director_thread \
215	director_unroll \
216	director_using \
217	director_void \
218	director_wombat \
219	disown \
220	dynamic_cast \
221	empty \
222	enum_ignore \
223	enum_plus \
224	enum_rename \
225	enum_scope_template \
226	enum_template \
227	enum_thorough \
228	enum_var \
229	equality \
230	evil_diamond \
231	evil_diamond_ns \
232	evil_diamond_prop \
233	exception_classname \
234	exception_order \
235	extend \
236	extend_constructor_destructor \
237	extend_default \
238	extend_placement \
239	extend_special_variables \
240	extend_template \
241	extend_template_method \
242	extend_template_ns \
243	extend_typedef_class \
244	extern_c \
245	extern_namespace \
246	extern_throws \
247	expressions \
248	features \
249	fragments \
250	friends \
251	friends_template \
252	funcptr_cpp \
253	functors \
254	fvirtual \
255	global_immutable_vars_cpp \
256	global_namespace \
257	global_ns_arg \
258	global_scope_types \
259	global_vars \
260	grouping \
261	ignore_parameter \
262	import_fragments \
263	import_nomodule \
264	inherit \
265	inherit_member \
266	inherit_missing \
267	inherit_same_name \
268	inherit_target_language \
269	inherit_void_arg \
270	inline_initializer \
271	insert_directive \
272	keyword_rename \
273	kind \
274	kwargs_feature \
275	langobj \
276	li_attribute \
277	li_attribute_template \
278	li_boost_shared_ptr \
279	li_boost_shared_ptr_attribute \
280	li_boost_shared_ptr_bits \
281	li_boost_shared_ptr_director \
282	li_boost_shared_ptr_template \
283	li_carrays_cpp \
284	li_cdata_cpp \
285	li_cpointer_cpp \
286	li_std_auto_ptr \
287	li_stdint \
288	li_swigtype_inout \
289	li_typemaps \
290	li_typemaps_apply \
291	li_windows \
292	long_long_apply \
293	memberin_extend \
294	member_funcptr_galore \
295	member_pointer \
296	member_pointer_const \
297	member_template \
298	minherit \
299	minherit2 \
300	mixed_types \
301	multiple_inheritance \
302	multiple_inheritance_abstract \
303	multiple_inheritance_interfaces \
304	multiple_inheritance_nspace \
305	multiple_inheritance_shared_ptr \
306	name_cxx \
307	name_warnings \
308	namespace_chase \
309	namespace_class \
310	namespace_enum \
311	namespace_extend \
312	namespace_forward_declaration \
313	namespace_nested \
314	namespace_spaces \
315	namespace_template \
316	namespace_typedef_class \
317	namespace_typemap \
318	namespace_union \
319	namespace_virtual_method \
320	nspace \
321	nspace_extend \
322	native_directive \
323	naturalvar \
324	naturalvar_more \
325	naturalvar_onoff \
326	nested_class \
327	nested_directors \
328	nested_comment \
329	nested_ignore \
330	nested_inheritance_interface \
331	nested_in_template \
332	nested_scope \
333	nested_template_base \
334	nested_workaround \
335	newobject1 \
336	newobject3 \
337	null_pointer \
338	operator_overload \
339	operator_overload_break \
340	operator_pointer_ref \
341	operbool \
342	ordering \
343	overload_arrays \
344	overload_bool \
345	overload_complicated \
346	overload_copy \
347	overload_extend \
348	overload_method \
349	overload_numeric \
350	overload_null \
351	overload_polymorphic \
352	overload_rename \
353	overload_return_type \
354	overload_simple \
355	overload_subtype \
356	overload_template \
357	overload_template_fast \
358	pointer_reference \
359	preproc_constants \
360	primitive_ref \
361	private_assign \
362	proxycode \
363	protected_rename \
364	pure_virtual \
365	redefined \
366	redefined_not \
367	refcount \
368	reference_global_vars \
369	rename1 \
370	rename2 \
371	rename3 \
372	rename4 \
373	rename_rstrip_encoder \
374	rename_scope \
375	rename_simple \
376	rename_strip_encoder \
377	rename_pcre_encoder \
378	rename_pcre_enum \
379	rename_predicates \
380	rename_wildcard \
381	restrict_cplusplus \
382	return_const_value \
383	return_value_scope \
384	rname \
385	samename \
386	sizet \
387	smart_pointer_const \
388	smart_pointer_const2 \
389	smart_pointer_const_overload \
390	smart_pointer_extend \
391	smart_pointer_ignore \
392	smart_pointer_member \
393	smart_pointer_multi \
394	smart_pointer_multi_typedef \
395	smart_pointer_namespace \
396	smart_pointer_namespace2 \
397	smart_pointer_not \
398	smart_pointer_overload \
399	smart_pointer_protected \
400	smart_pointer_rename \
401	smart_pointer_simple \
402	smart_pointer_static \
403	smart_pointer_template_const_overload \
404	smart_pointer_template_defaults_overload \
405	smart_pointer_templatemethods \
406	smart_pointer_templatevariables \
407	smart_pointer_typedef \
408	special_variables \
409	special_variable_attributes \
410	special_variable_macros \
411	static_array_member \
412	static_const_member \
413	static_const_member_2 \
414	stl_no_default_constructor \
415	string_constants \
416	struct_initialization_cpp \
417	struct_value \
418	swig_exception \
419	symbol_clash \
420	template_arg_replace \
421	template_arg_scope \
422	template_arg_typename \
423	template_array_numeric \
424	template_basic \
425	template_base_template \
426	template_classes \
427	template_class_reuse_name \
428	template_const_ref \
429	template_construct \
430	template_templated_constructors \
431	template_default \
432	template_default2 \
433	template_default_arg \
434	template_default_arg_overloaded \
435	template_default_arg_overloaded_extend \
436	template_default_arg_virtual_destructor \
437	template_default_cache \
438	template_default_class_parms \
439	template_default_class_parms_typedef \
440	template_default_inherit \
441	template_default_qualify \
442	template_default_vw \
443	template_empty_inherit \
444	template_enum \
445	template_enum_ns_inherit \
446	template_enum_typedef \
447	template_explicit \
448	template_extend1 \
449	template_extend2 \
450	template_extend_overload \
451	template_extend_overload_2 \
452	template_forward \
453	template_inherit \
454	template_inherit_abstract \
455	template_int_const \
456	template_keyword_in_type \
457	template_methods \
458	template_namespace_forward_declaration \
459	template_using_directive_and_declaration_forward \
460	template_using_directive_typedef \
461	template_nested \
462	template_nested_typemaps \
463	template_ns \
464	template_ns2 \
465	template_ns3 \
466	template_ns4 \
467	template_ns_enum \
468	template_ns_enum2 \
469	template_ns_inherit \
470	template_ns_scope \
471	template_parameters_global_scope \
472	template_partial_arg \
473	template_partial_specialization \
474	template_partial_specialization_typedef \
475	template_qualifier \
476	template_ref_type \
477	template_rename \
478	template_retvalue \
479	template_specialization \
480	template_specialization_defarg \
481	template_specialization_enum \
482	template_static \
483	template_tbase_template \
484	template_template_parameters \
485	template_typedef \
486	template_typedef_class_template \
487	template_typedef_cplx \
488	template_typedef_cplx2 \
489	template_typedef_cplx3 \
490	template_typedef_cplx4 \
491	template_typedef_cplx5 \
492	template_typedef_funcptr \
493	template_typedef_inherit \
494	template_typedef_ns \
495	template_typedef_ptr \
496	template_typedef_rec \
497	template_typedef_typedef \
498	template_typemaps \
499	template_typemaps_typedef \
500	template_typemaps_typedef2 \
501	template_using \
502	template_virtual \
503	template_whitespace \
504	threads \
505	threads_exception \
506	throw_exception \
507	typedef_array_member \
508	typedef_class \
509	typedef_classforward_same_name \
510	typedef_funcptr \
511	typedef_inherit \
512	typedef_mptr \
513	typedef_reference \
514	typedef_scope \
515	typedef_sizet \
516	typedef_struct_cpp \
517	typedef_typedef \
518	typemap_arrays \
519	typemap_array_qualifiers \
520	typemap_delete \
521	typemap_directorout \
522	typemap_documentation \
523	typemap_global_scope \
524	typemap_manyargs \
525	typemap_namespace \
526	typemap_ns_using \
527	typemap_numinputs \
528	typemap_template \
529	typemap_template_parm_typedef \
530	typemap_template_parms \
531	typemap_template_typedef \
532	typemap_out_optimal \
533	typemap_qualifier_strip \
534	typemap_variables \
535	typemap_various \
536	typename \
537	types_directive \
538	unicode_strings \
539	union_scope \
540	using1 \
541	using2 \
542	using_composition \
543	using_directive_and_declaration \
544	using_directive_and_declaration_forward \
545	using_extend \
546	using_inherit \
547	using_namespace \
548	using_namespace_loop \
549	using_pointers \
550	using_private \
551	using_protected \
552	valuewrapper \
553	valuewrapper_base \
554	valuewrapper_const \
555	valuewrapper_opaque \
556	varargs \
557	varargs_overload \
558	variable_replacement \
559	virtual_destructor \
560	virtual_derivation \
561	virtual_poly \
562	virtual_vs_nonvirtual_base \
563	voidtest \
564	wallkw \
565	wrapmacro \
566
567# C++11 test cases.
568CPP11_TEST_CASES += \
569	cpp11_alias_nested_template_scoping \
570	cpp11_alignment \
571	cpp11_alternate_function_syntax \
572	cpp11_constexpr \
573	cpp11_decltype \
574	cpp11_default_delete \
575	cpp11_delegating_constructors \
576	cpp11_director_enums \
577	cpp11_directors \
578	cpp11_explicit_conversion_operators \
579	cpp11_final_directors \
580	cpp11_final_override \
581	cpp11_function_objects \
582	cpp11_inheriting_constructors \
583	cpp11_initializer_list \
584	cpp11_initializer_list_extend \
585	cpp11_lambda_functions \
586	cpp11_noexcept \
587	cpp11_null_pointer_constant \
588	cpp11_raw_string_literals \
589	cpp11_ref_qualifiers \
590	cpp11_ref_qualifiers_rvalue_unignore \
591	cpp11_ref_qualifiers_typemaps \
592	cpp11_result_of \
593	cpp11_rvalue_reference \
594	cpp11_rvalue_reference2 \
595	cpp11_rvalue_reference3 \
596	cpp11_sizeof_object \
597	cpp11_static_assert \
598	cpp11_std_array \
599	cpp11_strongly_typed_enumerations \
600	cpp11_thread_local \
601	cpp11_template_double_brackets \
602	cpp11_template_explicit \
603	cpp11_template_typedefs \
604	cpp11_type_traits \
605	cpp11_type_aliasing \
606	cpp11_uniform_initialization \
607	cpp11_unrestricted_unions \
608	cpp11_userdefined_literals \
609
610# Broken C++11 test cases.
611CPP11_TEST_BROKEN = \
612#	cpp11_variadic_templates \    # Broken for some languages (such as Java)
613#	cpp11_reference_wrapper \     # No typemaps
614
615# Doxygen support test cases: can only be used with languages supporting
616# Doxygen comment translation (currently Python and Java) and only if not
617# disabled by configure via SKIP_DOXYGEN_TEST_CASES.
618ifneq ($(SKIP_DOXYGEN_TEST_CASES),1)
619python_HAS_DOXYGEN := 1
620java_HAS_DOXYGEN := 1
621
622$(eval HAS_DOXYGEN := $($(LANGUAGE)_HAS_DOXYGEN))
623endif
624
625ifdef HAS_DOXYGEN
626DOXYGEN_TEST_CASES += \
627	doxygen_alias \
628	doxygen_basic_notranslate \
629	doxygen_basic_translate \
630	doxygen_basic_translate_style2 \
631	doxygen_basic_translate_style3 \
632	doxygen_code_blocks \
633	doxygen_ignore \
634	doxygen_misc_constructs \
635	doxygen_nested_class \
636	doxygen_parsing \
637	doxygen_parsing_enums \
638	doxygen_translate \
639	doxygen_translate_all_tags \
640	doxygen_translate_links \
641
642$(DOXYGEN_TEST_CASES:=.cpptest): SWIGOPT += -doxygen
643
644CPP_TEST_CASES += $(DOXYGEN_TEST_CASES)
645endif
646
647#
648# Put all the heavy STD/STL cases here, where they can be skipped if needed
649#
650CPP_STD_TEST_CASES += \
651	director_string \
652	ignore_template_constructor \
653	li_std_combinations \
654	li_std_containers_overload \
655	li_std_deque \
656	li_std_except \
657	li_std_except_as_class \
658	li_std_map \
659	li_std_pair \
660	li_std_pair_using \
661	li_std_string \
662	li_std_vector \
663	li_std_vector_back_reference \
664	li_std_vector_enum \
665	li_std_vector_member_var\
666	li_std_vector_ptr \
667	li_std_wstring \
668	smart_pointer_inherit \
669	template_typedef_fnc \
670	template_type_namespace \
671	template_opaque \
672
673ifndef SKIP_CPP_STD_CASES
674CPP_TEST_CASES += ${CPP_STD_TEST_CASES}
675endif
676
677ifneq (,$(HAVE_CXX11_COMPILER))
678CPP_TEST_CASES += $(CPP11_TEST_CASES)
679endif
680
681# C test cases. (Can be run individually using: make testcase.ctest)
682C_TEST_CASES += \
683	arrays \
684	bom_utf8 \
685	c_delete \
686	c_delete_function \
687	char_constant \
688	const_const \
689	constant_expr \
690	default_args_c \
691	empty_c \
692	enums \
693	enum_forward \
694	enum_macro \
695	enum_missing \
696	extern_declaration \
697	funcptr \
698	function_typedef \
699	global_functions \
700	global_immutable_vars \
701	immutable_values \
702	inctest \
703	infinity \
704	integers \
705	keyword_rename_c \
706	lextype \
707	li_carrays \
708	li_cdata \
709	li_cmalloc \
710	li_constraints \
711	li_cpointer \
712	li_math \
713	long_long \
714	memberin_extend_c \
715	name \
716	nested \
717	nested_extend_c \
718	nested_structs \
719	newobject2 \
720	overload_extend_c \
721	overload_extend2 \
722	preproc \
723	preproc_constants_c \
724	preproc_defined \
725	preproc_gcc_output \
726	preproc_include \
727	preproc_line_file \
728	register_par \
729	ret_by_value \
730	simple_array \
731	sizeof_pointer \
732	sneaky1 \
733	string_simple \
734	struct_rename \
735	struct_initialization \
736	typedef_classforward_same_name \
737	typedef_struct \
738	typemap_subst \
739	union_parameter \
740	unions \
741
742
743# Multi-module C++ test cases . (Can be run individually using make testcase.multicpptest)
744MULTI_CPP_TEST_CASES += \
745	clientdata_prop \
746	import_stl \
747	imports \
748	mod \
749	multi_import \
750	packageoption \
751	template_typedef_import \
752
753# Custom tests - tests with additional commandline options
754wallkw.cpptest: SWIGOPT += -Wallkw
755preproc_include.ctest: SWIGOPT += -includeall
756
757# Allow modules to define temporarily failing tests.
758C_TEST_CASES := $(filter-out $(FAILING_C_TESTS),$(C_TEST_CASES))
759CPP_TEST_CASES := $(filter-out $(FAILING_CPP_TESTS),$(CPP_TEST_CASES))
760MULTI_CPP_TEST_CASES := $(filter-out $(FAILING_MULTI_CPP_TESTS),$(MULTI_CPP_TEST_CASES))
761
762
763NOT_BROKEN_TEST_CASES =	$(CPP_TEST_CASES:=.cpptest) \
764			$(C_TEST_CASES:=.ctest) \
765			$(MULTI_CPP_TEST_CASES:=.multicpptest) \
766			$(EXTRA_TEST_CASES)
767
768BROKEN_TEST_CASES = 	$(CPP_TEST_BROKEN:=.cpptest) \
769			$(C_TEST_BROKEN:=.ctest)
770
771ALL_CLEAN = 		$(CPP_TEST_CASES:=.clean) \
772			$(C_TEST_CASES:=.clean) \
773			$(MULTI_CPP_TEST_CASES:=.clean) \
774			$(CPP_TEST_BROKEN:=.clean) \
775			$(C_TEST_BROKEN:=.clean)
776
777#######################################################################
778# Error test suite has its own set of test cases
779#######################################################################
780ifneq (,$(ERROR_TEST_CASES))
781check: $(ERROR_TEST_CASES)
782else
783
784#######################################################################
785# The following applies for all module languages
786#######################################################################
787all: $(NOT_BROKEN_TEST_CASES) $(BROKEN_TEST_CASES)
788
789broken: $(BROKEN_TEST_CASES)
790
791check: $(NOT_BROKEN_TEST_CASES)
792	@echo $(words $^) $(LANGUAGE) tests passed
793
794check-c: $(C_TEST_CASES:=.ctest)
795
796check-cpp: $(CPP_TEST_CASES:=.cpptest)
797
798check-cpp11: $(CPP11_TEST_CASES:=.cpptest)
799
800ifdef HAS_DOXYGEN
801check-doxygen: $(DOXYGEN_TEST_CASES:=.cpptest)
802endif
803
804check-failing-test = \
805	$(MAKE) -s $1.$2 >/dev/null 2>/dev/null && echo "Failing test $1 passed."
806
807check-failing:
808	+-$(foreach t,$(FAILING_C_TESTS),$(call check-failing-test,$t,ctest);)
809	+-$(foreach t,$(FAILING_CPP_TESTS),$(call check-failing-test,$t,cpptest);)
810	+-$(foreach t,$(FAILING_MULTI_CPP_TESTS),$(call check-failing-test,$t,multicpptest);)
811endif
812
813# partialcheck target runs SWIG only, ie no compilation or running of tests (for a subset of languages)
814partialcheck:
815	$(MAKE) check CC=true CXX=true LDSHARED=true CXXSHARED=true RUNTOOL=true COMPILETOOL=true
816
817swig_and_compile_cpp =  \
818	$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' \
819	SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
820	INCLUDES='$(INCLUDES)' SWIGOPT='$(SWIGOPT)' NOLINK=true \
821	TARGET='$(TARGETPREFIX)$*$(TARGETSUFFIX)' INTERFACEDIR='$(INTERFACEDIR)' INTERFACE='$*.i' \
822	$(LANGUAGE)$(VARIANT)_cpp
823
824swig_and_compile_c =  \
825	$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR='$(SRCDIR)' CSRCS='$(CSRCS)' \
826	SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
827	INCLUDES='$(INCLUDES)' SWIGOPT='$(SWIGOPT)' NOLINK=true \
828	TARGET='$(TARGETPREFIX)$*$(TARGETSUFFIX)' INTERFACEDIR='$(INTERFACEDIR)' INTERFACE='$*.i' \
829	$(LANGUAGE)$(VARIANT)
830
831swig_and_compile_multi_cpp = \
832	for f in `cat $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$*.list` ; do \
833	  $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' \
834	  SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
835	  LIBS='$(LIBS)' INCLUDES='$(INCLUDES)' SWIGOPT='$(SWIGOPT)' NOLINK=true \
836	  TARGET="$(TARGETPREFIX)$${f}$(TARGETSUFFIX)" INTERFACEDIR='$(INTERFACEDIR)' INTERFACE="$$f.i" \
837	  $(LANGUAGE)$(VARIANT)_cpp; \
838	done
839
840swig_and_compile_external =  \
841	$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR='$(SRCDIR)' \
842	SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
843	TARGET='$*_wrap_hdr.h' \
844	$(LANGUAGE)$(VARIANT)_externalhdr && \
845	$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS) $*_external.cxx' \
846	SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
847	INCLUDES='$(INCLUDES)' SWIGOPT='$(SWIGOPT)' NOLINK=true \
848	TARGET='$(TARGETPREFIX)$*$(TARGETSUFFIX)' INTERFACEDIR='$(INTERFACEDIR)' INTERFACE='$*.i' \
849	$(LANGUAGE)$(VARIANT)_cpp
850
851swig_and_compile_runtime = \
852
853setup = \
854	if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then	  \
855	  echo "$(ACTION)ing $(LANGUAGE) testcase $* (with run test)" ; \
856	else								  \
857	  echo "$(ACTION)ing $(LANGUAGE) testcase $*" ;		  \
858	fi
859
860
861
862#######################################################################
863# Clean
864#######################################################################
865clean: $(ALL_CLEAN)
866
867distclean: clean
868	@rm -f Makefile
869
870.PHONY: all check partialcheck broken clean distclean
871
872