Add partialcheck make targets. Also add RUNTOOL, COMPILETOOL and SWIGTOOL variables for invoking tools when running tests, compiling or invoking swig

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10482 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2008-05-20 21:27:22 +00:00
commit f06222b993
26 changed files with 116 additions and 88 deletions

View file

@ -3,11 +3,7 @@
#######################################################################
LANGUAGE = python
ifneq (,$(USE_VALGRIND))
PYTHON = valgrind --leak-check=full --suppressions=pyswig.supp @PYTHON@
else
PYTHON = @PYTHON@
endif
SCRIPTSUFFIX = _runme.py
srcdir = @srcdir@
top_srcdir = @top_srcdir@
@ -63,6 +59,7 @@ include $(srcdir)/../common.mk
# Overridden variables here
LIBS = -L.
VALGRIND_OPT += --suppressions=pythonswig.supp
# Rules for the different types of tests
%.cpptest:
@ -84,7 +81,7 @@ LIBS = -L.
# a file is found which has _runme.py appended after the testcase name.
run_testcase = \
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then ( \
env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PYTHONPATH=$(srcdir):$$PYTHONPATH $(PYTHON) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX);) \
env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH PYTHONPATH=$(srcdir):$$PYTHONPATH $(RUNTOOL) $(PYTHON) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX);) \
fi;
# Clean: remove the generated .py file