PageRenderTime 43ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

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

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