PageRenderTime 7ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/ocaml/Makefile.in

#
Autoconf | 83 lines | 62 code | 12 blank | 9 comment | 8 complexity | 30914bcc6b41ff401d98a0c7323fc15a MD5 | raw file
 1#######################################################################
 2# Makefile for ocaml test-suite
 3#######################################################################
 4
 5LANGUAGE     = ocaml
 6OCAMLC       = ocamlc
 7VARIANT      = _static
 8SCRIPTSUFFIX = _runme.ml
 9srcdir       = @srcdir@
10top_srcdir   = @top_srcdir@
11top_builddir = @top_builddir@
12
13C_TEST_CASES = 
14
15run_testcase = \
16	if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) -a \
17	     -f $(top_srcdir)/Examples/test-suite/$*.list ] ; then \
18		$(COMPILETOOL) $(OCAMLC) -c $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
19		$(COMPILETOOL) $(OCAMLC) 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; \
20	elif [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
21		$(COMPILETOOL) $(OCAMLC) -c $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
22		$(COMPILETOOL) $(OCAMLC) swig.cmo -custom -g -cc '$(CXX)' -o runme $(srcdir)/$(*).cmo $(srcdir)/$(*)_runme.cmo $(srcdir)/$(*)_wrap.o && \
23		$(RUNTOOL) ./runme; \
24	fi ; 
25
26check_quant:
27	cat /dev/null > testing
28	cat /dev/null > success
29	cat /dev/null > results
30	$(MAKE) check
31	echo "Failed:" >> results
32	for element in `cat testing` ; do \
33		if grep $$element success >/dev/null 2>/dev/null ; then \
34			: ; \
35		else \
36			echo $$element >> results ; \
37		fi ; \
38	done
39	echo "Success:" >> results
40	cat success >> results
41
42include $(srcdir)/../common.mk
43
44# Overridden variables here
45# none!
46
47# Custom tests - tests with additional commandline options
48# none!
49
50# Rules for the different types of tests
51%.cpptest:
52	echo $@ >> testing
53	$(setup)
54	+$(swig_and_compile_cpp)
55	$(run_testcase)
56	if [ -f $(@:%.cpptest=%_wrap.o) ] ; then \
57		echo $@ >> success ; \
58	fi
59
60%.ctest:
61	echo $@ >> testing
62	$(setup)
63	+$(swig_and_compile_c)
64	$(run_testcase)
65	if [ -f $(@:%.ctest=%_wrap.o) ] ; then \
66		echo $@ >> success ; \
67	fi
68
69%.multicpptest:
70	echo $@ >> testing
71	+$(swig_and_compile_multi_cpp)
72	$(setup)
73	$(run_testcase)
74	if [ -f $(@:%.multicpptest=%_runtime_wrap.o) ] ; then \
75		echo $@ >> success ; \
76	fi
77
78# Clean
79%.clean:
80	@rm -f $*.ml $*.mli;
81
82clean:
83	$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile ocaml_clean