File: Makefile.in

package info (click to toggle)
swig 4.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 45,980 kB
  • sloc: cpp: 54,284; ansic: 29,022; java: 17,595; python: 12,734; cs: 10,421; ruby: 7,263; yacc: 6,501; makefile: 5,860; javascript: 5,538; sh: 5,422; perl: 4,246; php: 3,733; ml: 2,198; tcl: 2,015; lisp: 1,448; xml: 115
file content (116 lines) | stat: -rw-r--r-- 3,201 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
#######################################################################
# Makefile for ocaml test-suite
#######################################################################

LANGUAGE     = ocaml
OCAMLP4WHERE =`$(COMPILETOOL) @CAMLP4@ -where`
OCC          =$(COMPILETOOL) @OCAMLC@
OCAMLPP      = -pp "camlp4o ./swigp4.cmo"
VARIANT      = _static
SCRIPTSUFFIX = _runme.ml

HAVE_CXX11   = @HAVE_CXX11@
HAVE_CXX14   = @HAVE_CXX14@
HAVE_CXX17   = @HAVE_CXX17@
HAVE_CXX20   = @HAVE_CXX20@
srcdir       = @srcdir@
top_srcdir   = @top_srcdir@
top_builddir = @top_builddir@

FAILING_CPP_TESTS = \
allprotected \
apply_strings \
cpp11_decltype \
cpp11_director_enums \
cpp11_strongly_typed_enumerations \
cpp_enum \
default_constructor \
director_binary_string \
director_binary_string_rev_len \
director_comparison_operators \
director_enum \
director_primitives \
director_string \
director_using_member_scopes \
enum_thorough \
smart_pointer_inherit \

FAILING_C_TESTS = \
enums \

C_TEST_CASES += \
	multivalue \

ml_runme = $(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)

run_testcase = \
	if [ -f $(srcdir)/$(ml_runme) ]; then \
		if [ $(srcdir) != . ]; then \
			cp $(srcdir)/$(ml_runme) $(ml_runme); \
		fi ; \
		$(OCC) $(OCAMLPP) -c $(ml_runme) && \
		if [ -f $(top_srcdir)/Examples/test-suite/$*.list ]; then \
			$(OCC) swig.cmo -custom -g -cc '$(CXX)' -o $*_runme `cat $(top_srcdir)/Examples/test-suite/$(*).list | sed -e 's/\(.*\)/\1_wrap.o \1.cmo/g'`&& $(RUNTOOL) ./$*_runme; \
		else \
			$(OCC) swig.cmo -custom -g -cc '$(CXX)' -o $*_runme $(*).cmo $(*)_runme.cmo $(*)_wrap.o && $(RUNTOOL) ./$*_runme; \
		fi ; \
	fi ;

include $(srcdir)/../common.mk

# Overridden variables here

# Ensure testsuite remains free from SWIG warnings.
SWIGOPT += -Werror

SWIGOPT += -w524 # Suppress SWIGWARN_LANG_EXPERIMENTAL warning

# Custom tests - tests with additional commandline options
# none!

# Rules for the different types of tests
%.cpptest:
	$(setup)
	+$(swig_and_compile_cpp)
	$(run_testcase)

%.ctest:
	$(setup)
	+$(swig_and_compile_c)
	$(run_testcase)

%.multicpptest:
	+$(swig_and_compile_multi_cpp)
	$(setup)
	$(run_testcase)

swig.cmi:
	env SWIG_LIB=$(SWIG_LIB_DIR) $(SWIGEXE) -ocaml -co swig.mli
	$(OCC) -c swig.mli
swig.cmo:
	env SWIG_LIB=$(SWIG_LIB_DIR) $(SWIGEXE) -ocaml -co swig.ml
	$(OCC) -c swig.ml
swigp4.cmi:
	env SWIG_LIB=$(SWIG_LIB_DIR) $(SWIGEXE) -ocaml -co swigp4.ml
	$(OCC) -I $(OCAMLP4WHERE) -pp "camlp4o pa_extend.cmo q_MLast.cmo" -c swigp4.ml
extra_objects: swig.cmi swig.cmo swigp4.cmi

$(C_TEST_CASES:=.ctest): extra_objects
$(CPP_TEST_CASES:=.cpptest): extra_objects
$(CPP11_TEST_CASES:=.cpptest): extra_objects
$(MULTI_CPP_TEST_CASES:=.multicpptest): extra_objects

# Clean
%.clean:
	@rm -f $*_wrap.* $*.cmo $*.cmi $*.ml $*.mli $*_runme;
	@if test $(srcdir) != .; then rm -f $(ml_runme); fi

clean:
	$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR='$(SRCDIR)' ocaml_clean
	rm -f clientdata_prop_a.ml clientdata_prop_b.ml
	rm -f import_stl_a.ml import_stl_b.ml
	rm -f imports_a.ml imports_b.ml
	rm -f mod_a.ml mod_b.ml
	rm -f multi_import_a.ml multi_import_b.ml multi_import_d.ml
	rm -f packageoption_a.ml packageoption_b.ml packageoption_c.ml
	rm -f template_typedef_cplx2.ml