PageRenderTime 38ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Autoconf | 99 lines | 65 code | 21 blank | 13 comment | 4 complexity | f11cf7089f8065b03126b9652b4e000d MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. #######################################################################
  2. # Makefile for chicken test-suite
  3. #######################################################################
  4. LANGUAGE = chicken
  5. VARIANT =
  6. SCRIPTSUFFIX = _runme.ss
  7. PROXYSUFFIX = _runme_proxy.ss
  8. srcdir = @srcdir@
  9. top_srcdir = @top_srcdir@
  10. top_builddir = @top_builddir@
  11. CHICKEN_CSI = @CHICKEN_CSI@ -quiet -batch -no-init
  12. SO = @SO@
  13. #C_TEST_CASES = long_long list_vector pointer_in_out multivalue
  14. # Skip the STD cases for now, except for li_std_string.i
  15. SKIP_CPP_STD_CASES = Yes
  16. CPP_TEST_CASES += li_std_string
  17. EXTRA_TEST_CASES += chicken_ext_test.externaltest
  18. include $(srcdir)/../common.mk
  19. # Overridden variables here
  20. SWIGOPT += -nounit
  21. # Custom tests - tests with additional commandline options
  22. # If there exists a PROXYSUFFIX runme file, we also generate the wrapper
  23. # with the -proxy argument
  24. %.cppproxy: SWIGOPT += -proxy
  25. %.cppproxy: SCRIPTSUFFIX = $(PROXYSUFFIX)
  26. %.cproxy: SWIGOPT += -proxy
  27. %.cproxy: SCRIPTSUFFIX = $(PROXYSUFFIX)
  28. %.multiproxy: SWIGOPT += -proxy -noclosuses
  29. %.multiproxy: SCRIPTSUFFIX = $(PROXYSUFFIX)
  30. # Rules for the different types of tests
  31. %.cpptest:
  32. $(setup)
  33. +$(swig_and_compile_cpp)
  34. $(run_testcase)
  35. if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(PROXYSUFFIX) ]; then \
  36. $(MAKE) $*.cppproxy; \
  37. fi
  38. %.ctest:
  39. $(setup)
  40. +$(swig_and_compile_c)
  41. $(run_testcase)
  42. if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(PROXYSUFFIX) ]; then \
  43. $(MAKE) $*.cproxy; \
  44. fi
  45. %.multicpptest:
  46. $(setup)
  47. +$(swig_and_compile_multi_cpp)
  48. $(run_testcase)
  49. if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(PROXYSUFFIX) ]; then \
  50. $(MAKE) $*.multiproxy; \
  51. fi
  52. %.externaltest:
  53. $(setup)
  54. +$(swig_and_compile_external)
  55. $(run_testcase)
  56. %.cppproxy:
  57. echo "$(ACTION)ing testcase $* (with run test) under chicken with -proxy"
  58. +$(swig_and_compile_cpp)
  59. $(run_testcase)
  60. %.cproxy:
  61. echo "$(ACTION)ing testcase $* (with run test) under chicken with -proxy"
  62. +$(swig_and_compile_c)
  63. $(run_testcase)
  64. %.multiproxy:
  65. echo "$(ACTION)ing testcase $* (with run test) under chicken with -proxy"
  66. +$(swig_and_compile_multi_cpp)
  67. $(run_testcase)
  68. # Runs the testcase. A testcase is only run if
  69. # a file is found which has _runme.scm appended after the testcase name.
  70. run_testcase = \
  71. if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
  72. env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(CHICKEN_CSI) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
  73. fi
  74. # Clean
  75. %.clean:
  76. clean:
  77. $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile chicken_clean
  78. rm -f *.scm