swig/Examples/test-suite/ruby/Makefile.in
Marcelo Matus f77b1da32e add option to use valgrind
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8876 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-02-23 07:17:49 +00:00

68 lines
1.4 KiB
Makefile

#######################################################################
# $Header$
# Makefile for ruby test-suite
#######################################################################
LANGUAGE = ruby
ifneq (,$(USE_VALGRIND))
RUBY = valgrind --leak-check=full ruby
else
RUBY = ruby
endif
SCRIPTSUFFIX = _runme.rb
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
CPP_TEST_CASES = \
track_objects \
track_objects_directors \
primitive_types \
li_cdata \
li_cstring \
naming \
keywords
C_TEST_CASES += \
li_cdata \
li_cstring
include $(srcdir)/../common.mk
# Overridden variables here
SWIGOPT += -noautorename
# Rules for the different types of tests
# make sure -autorename is true for the naming test
naming.cpptest: SWIGOPT = -autorename
%.cpptest:
$(setup) \
($(swig_and_compile_cpp); ) &&\
$(run_testcase)
%.ctest:
$(setup) \
($(swig_and_compile_c); ) &&\
$(run_testcase)
%.multicpptest:
$(setup) \
($(swig_and_compile_multi_cpp); ) &&\
$(run_testcase)
# Runs the testcase. A testcase is only run if
# a file is found which has _runme.rb appended after the testcase name.
run_testcase = \
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then ( \
env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUBY) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX);) \
fi;
# Clean
%.clean:
clean:
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile ruby_clean