/trunk/Examples/test-suite/php/Makefile.in
Autoconf | 70 lines | 44 code | 15 blank | 11 comment | 5 complexity | 2aa2d9f09f91985c0b9d40b380450a67 MD5 | raw file
1####################################################################### 2# Makefile for php test-suite 3####################################################################### 4 5LANGUAGE = php 6SCRIPTSUFFIX = _runme.php 7srcdir = @srcdir@ 8top_srcdir = @top_srcdir@ 9top_builddir = @top_builddir@ 10 11CPP_TEST_CASES += \ 12 php_namewarn_rename \ 13 14include $(srcdir)/../common.mk 15 16# Overridden variables here 17TARGETPREFIX =# Should be php_ for Windows, empty otherwise 18 19# Custom tests - tests with additional commandline options 20prefix.cpptest: SWIGOPT += -prefix Project 21 22# write out tests without a _runme.php 23missingcpptests: 24 for test in $(CPP_TEST_CASES) ; do test -f $${test}_runme.php || echo $${test}; done 25 26missingctests: 27 for test in $(C_TEST_CASES) ; do test -f $${test}_runme.php || echo $${test}; done 28 29missingtests: missingcpptests missingctests 30 31# Rules for the different types of tests 32%.cpptest: 33 $(setup) 34 +$(swig_and_compile_cpp) 35 +$(run_testcase) 36 37%.ctest: 38 $(setup) 39 +$(swig_and_compile_c) 40 +$(run_testcase) 41 42%.multicpptest: 43 $(setup) 44 +$(swig_and_compile_multi_cpp) 45 +$(run_testcase) 46 47# Smart target 48%.test: 49 @echo ' $(C_TEST_CASES) '|grep -F -v ' $* ' >/dev/null ||\ 50 $(MAKE) $*.ctest 51 @echo ' $(CPP_TEST_CASES) '|grep -F -v ' $* ' >/dev/null ||\ 52 $(MAKE) $*.cpptest 53 @echo ' $(MULTI_CPP_TEST_CASES) '|grep -F -v ' $* ' >/dev/null ||\ 54 $(MAKE) $*.multicpptest 55 56# Runs the testcase. Tries to run testcase_runme.php, and if that's not 57# found, runs testcase.php, except for multicpptests. 58run_testcase = \ 59 if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \ 60 $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile PHPSCRIPT=$(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) RUNTOOL="$(RUNTOOL)" php_run; \ 61 elif [ -f $(srcdir)/$(SCRIPTPREFIX)$*.php -a ! -f $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$*.list ]; then \ 62 $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile PHPSCRIPT=$(srcdir)/$(SCRIPTPREFIX)$*.php RUNTOOL="$(RUNTOOL)" php_run; \ 63 fi 64 65# Clean: remove the generated .php file 66%.clean: 67 @rm -f $*.php; 68 69clean: 70 $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile php_clean