PageRenderTime 25ms CodeModel.GetById 0ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Autoconf | 90 lines | 65 code | 13 blank | 12 comment | 9 complexity | e7e11ec8ac01bb7ff9c2a6ffabd3a7cb MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. #######################################################################
  2. # Makefile for C# test-suite
  3. #######################################################################
  4. LANGUAGE = csharp
  5. SCRIPTSUFFIX = _runme.cs
  6. INTERPRETER = @CSHARPCILINTERPRETER@
  7. INTERPRETER_FLAGS = @CSHARPCILINTERPRETER_FLAGS@
  8. CSHARPPATHSEPARATOR = "@CSHARPPATHSEPARATOR@"
  9. CSHARPCYGPATH_W = @CSHARPCYGPATH_W@
  10. srcdir = @srcdir@
  11. top_srcdir = ../@top_srcdir@
  12. top_builddir = ../@top_builddir@
  13. CPP_TEST_CASES = \
  14. csharp_attributes \
  15. csharp_exceptions \
  16. csharp_features \
  17. csharp_lib_arrays \
  18. csharp_prepost \
  19. csharp_typemaps \
  20. enum_thorough_simple \
  21. enum_thorough_typesafe \
  22. exception_partial_info \
  23. intermediary_classname \
  24. li_boost_intrusive_ptr
  25. include $(srcdir)/../common.mk
  26. # Overridden variables here
  27. SWIGOPT += -namespace $*Namespace
  28. CSHARPFLAGSSPECIAL =
  29. # Custom tests - tests with additional commandline options
  30. intermediary_classname.cpptest: SWIGOPT += -dllimport intermediary_classname
  31. csharp_lib_arrays.cpptest: CSHARPFLAGSSPECIAL = -unsafe
  32. # Rules for the different types of tests
  33. %.cpptest:
  34. $(setup)
  35. +(cd $* && $(swig_and_compile_cpp))
  36. +$(run_testcase)
  37. %.ctest:
  38. $(setup)
  39. +(cd $* && $(swig_and_compile_c))
  40. +$(run_testcase)
  41. %.multicpptest:
  42. $(setup)
  43. +(cd $* && $(swig_and_compile_multi_cpp))
  44. +$(run_testcase)
  45. # Makes a directory for the testcase if it does not exist
  46. setup = \
  47. if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
  48. echo "$(ACTION)ing testcase $* (with run test) under $(LANGUAGE)" ; \
  49. else \
  50. echo "$(ACTION)ing testcase $* under $(LANGUAGE)" ; \
  51. fi; \
  52. if [ ! -d $* ]; then \
  53. mkdir $*; \
  54. fi
  55. # Compiles C# files then runs the testcase. A testcase is only run if
  56. # a file is found which has _runme.cs appended after the testcase name.
  57. # Note C# uses LD_LIBRARY_PATH under Unix, PATH under Cygwin/Windows and SHLIB_PATH on HPUX.
  58. # DYLD_FALLBACK_LIBRARY_PATH is cleared for MacOSX.
  59. run_testcase = \
  60. if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
  61. $(MAKE) -f $*/$(top_builddir)/$(EXAMPLES)/Makefile \
  62. CSHARPFLAGS='-nologo -debug+ $(CSHARPFLAGSSPECIAL) -out:$*_runme.exe' \
  63. CSHARPSRCS='`$(CSHARPCYGPATH_W) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)` `find $* -name "*.cs" -exec $(CSHARPCYGPATH_W) "{}" \+`' csharp_compile && \
  64. env LD_LIBRARY_PATH="$*:$$LD_LIBRARY_PATH" PATH="$*:$$PATH" SHLIB_PATH="$*:$$SHLIB_PATH" DYLD_FALLBACK_LIBRARY_PATH= $(RUNTOOL) $(INTERPRETER) $(INTERPRETER_FLAGS) $*_runme.exe; \
  65. else \
  66. cd $* && \
  67. $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile \
  68. CSHARPFLAGS='-nologo -debug+ $(CSHARPFLAGSSPECIAL) -t:module -out:$*.netmodule' \
  69. CSHARPSRCS='`find . -name "*.cs" -exec $(CSHARPCYGPATH_W) "{}" \+`' csharp_compile; \
  70. fi
  71. # Clean: remove testcase directories
  72. %.clean:
  73. @if [ -d $* ]; then \
  74. rm -rf $*; \
  75. fi
  76. clean:
  77. @rm -f *.exe *.exe.mdb