swig/Examples/test-suite/java/Makefile.in
William S Fulton 0cfd53cff7 Merge branch 'master' into vadz-doxygen
* master:
  Add Octave 4.4 to Travis allow_failures
  Fixes for appveyor image changes
  Javascript test-suite Makefile parallel jobs
  Add changes entry for csconstruct, dconstruct and javaconstruct fix
  Fix lookup of csconstruct, dconstructor and javaconstruct typemaps
  Javascript %nspace fix in generated C++ code
  Add C++17 documentation chapter
  Add changes notes for C++17 nested namespaces support
  Test for invalid C++17 nested namespace aliases
  Test c++17 nested namespaces and %nspace
  Add c++17 nested namespaces runtime test for C#
  Add c++17 nested namespaces runtime test for Python
  Add support for c++17 nested namespaces
  Update CHANGES.current
  .travis.yml: test against Octave 4.4
  Examples/test-suite/register_par.i: rename 'tree' to 'swig_tree'
  Examples/octave/module_load/runme.m: update 'exist()' statements for Octave >= 4.4
  Examples/octave/module_load/runme.m: do not use duplicate function names
  Examples/Makefile.in: unset OCTAVE_PATH when running Octave for tests
  Lib/octave: fix getting/setting global variables for Octave >= 4.4
  Lib/octave: use new class for function member dereference with Octave >= 4.4
  Lib/octave: fix operator installation for Octave >= 4.4
  Lib/Octave: in Octave >= 4.4, assign reference to base class in subclass
  Lib/octave: fix call to mlock() for Octave >= 4.4
  Lib/octave: fix call to octave::call_stack::current() for Octave >= 4.4
  Lib/octave: 'octave_exit' not longer exists in Octave >= 4.4
  Lib/octave: replace is_bool_type() with islogical() for Octave >= 4.4
  Lib/octave: replace is_numeric_type() with isnumeric() for Octave >= 4.4
  Lib/octave: replace is_cell() with iscell() for Octave >= 4.4
  Lib/octave: call octave::feval() instead of feval() for Octave >= 4.4
  Lib/octave: fix function name passed to unwind_protect::begin_frame()
  C#, D, Java methodmodifiers on destructors
  Javascript assert.h - move to header section
  Appveyor cl compiler warning fixes during configure
  Java vector wrappers cast correction
  test-suite fixes (Java directors) for compilers that don't support varargs
  Go - use director.swg like other languages
  test-suite fixes (2) for compilers that don't support varargs
  Consistent spacing in generated exception specifications
  test-suite fixes for compilers that don't support vararg macros
  Enhance Travis testing to use gcc 8 and test C++17 and C17
  Enhance SWIG_isfinite for older standards: C++03/C++98/C89
  test-suite support for gcc-8 targeting C++11 and C++14
  Scilab portability fixes - remove use of strdup
  Scilab array overbounds fix handling char type exceptions
  test-suite fix for c++17 and throw macro
  Remove use of 'register' in C source
  test-suite support for C++17: switch testing of the deprecated C++17 'register' keyword from C++ to C
  Examples update to support C++17: exception specification throw removal
  Cosmetic syntax tweak using throw in Octave directors
  test-suite support for C++17 (Java): exception specification throw removal
  test-suite support for C++17: exception specification throw removal
  __cplusplus macro usage tweak
  Improve detection of Python's 2to3 tool
  Correct C shared library creation when specifing CC to configure
  Remove superfluous parens in generated Python scripts.
  [ci] guile 2.2 build no longer expected to fail
  guile - resstructure some configure tests
  Disable guile configuration if guile-config and guile report a different version
  Fix guile executable detection on early 2.0.x guile versions
  guile - drop GDB_INTERFACE related stuff
  guile - replace obsolete scm_listify with scm_list_n
  guile - use more reliable method of finding guile executable based on guile-config
  Fix go version matching in configure for go1.10
  [Python] Suppress new pycodestyle warning
  Add if-no-present action for jsv8inc arg
  Fix typo in help --with-jscoreinc and --with-jscorelib
  Fix off-by-one error
  * Makefile.in (configfiles): Update URLs for latest configfiles.
  Add changes entry for Ruby %alias fix for global functions
  [Ruby] Pass Qnil instead of NULL to rb_funcall()
  Fix typo
  Fix ruby %alias directive for native c functions
  Stop testing Python on Appveyor msys/mingw
  Fix -Wimplicit-fallthrough gcc-7.3 warning
2018-05-17 19:57:02 +01:00

131 lines
4.1 KiB
Makefile

#######################################################################
# Makefile for java test-suite
#######################################################################
LANGUAGE = java
JAVA = @JAVA@
JAVAC = @JAVAC@
JAVAFLAGS = @JAVAFLAGS@
JAVA_CLASSPATH_SEP = @JAVA_CLASSPATH_SEP@
SCRIPTSUFFIX = _runme.java
JAVA_HOME ?= @JAVA_HOME@
srcdir = @srcdir@
top_srcdir = ../@top_srcdir@
top_builddir = ../@top_builddir@
C_TEST_CASES = \
java_lib_arrays \
java_lib_various
CPP_TEST_CASES = \
enum_thorough_proper \
enum_thorough_simple \
enum_thorough_typeunsafe \
exception_partial_info \
intermediary_classname \
java_constants \
java_director \
java_director_assumeoverride \
java_director_exception_feature \
java_director_exception_feature_nspace \
java_director_ptrclass \
java_director_typemaps \
java_enums \
java_jnitypes \
java_lib_arrays_dimensionless \
java_lib_various \
java_nspacewithoutpackage \
java_pgcpp \
java_pragmas \
java_prepost \
java_throws \
java_typemaps_proxy \
java_typemaps_typewrapper \
li_std_list \
# li_boost_intrusive_ptr
CPP11_TEST_CASES = \
cpp11_shared_ptr_const \
cpp11_shared_ptr_nullptr_in_containers \
cpp11_shared_ptr_overload \
cpp11_shared_ptr_upcast \
cpp11_strongly_typed_enumerations_simple \
DOXYGEN_TEST_CASES := \
doxygen_parsing_enums_simple \
doxygen_parsing_enums_proper \
doxygen_parsing_enums_typesafe \
doxygen_parsing_enums_typeunsafe \
include $(srcdir)/../common.mk
# Overridden variables here
SRCDIR = ../$(srcdir)/
JAVA_PACKAGE = $*
JAVA_PACKAGEOPT = -package $(JAVA_PACKAGE)
SWIGOPT += $(JAVA_PACKAGEOPT)
# Custom tests - tests with additional commandline options
cpp17_nspace_nested_namespaces.%: JAVA_PACKAGE = $*Package
director_nspace.%: JAVA_PACKAGE = $*Package
director_nspace_director_name_collision.%: JAVA_PACKAGE = $*Package
java_director_exception_feature_nspace.%: JAVA_PACKAGE = $*Package
java_nspacewithoutpackage.%: JAVA_PACKAGEOPT =
multiple_inheritance_nspace.%: JAVA_PACKAGE = $*Package
nspace.%: JAVA_PACKAGE = $*Package
nspace_extend.%: JAVA_PACKAGE = $*Package
doxygen_misc_constructs.%: INCLUDES = -I../$(srcdir)/..
# Rules for the different types of tests
%.cpptest:
$(setup)
+(cd $(JAVA_PACKAGE) && $(swig_and_compile_cpp))
$(run_testcase)
%.ctest:
$(setup)
+(cd $(JAVA_PACKAGE) && $(swig_and_compile_c))
$(run_testcase)
%.multicpptest:
$(setup)
+(cd $(JAVA_PACKAGE) && $(swig_and_compile_multi_cpp))
$(run_testcase)
# Makes a directory for the testcase if it does not exist
setup = \
if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
echo "$(ACTION)ing $(LANGUAGE) testcase $* (with run test)" ; \
else \
echo "$(ACTION)ing $(LANGUAGE) testcase $*" ; \
fi; \
if [ ! -d $(JAVA_PACKAGE) ]; then \
mkdir $(JAVA_PACKAGE); \
fi
# Doxygen test cases need to be compiled together with the CommentsParser class
# which depends on com.sun.javadoc package which is located in this JAR.
JAVA_CLASSPATH := .
$(DOXYGEN_TEST_CASES:=.cpptest): JAVA_CLASSPATH := "$(JAVA_HOME)/lib/tools.jar$(JAVA_CLASSPATH_SEP)."
$(DOXYGEN_TEST_CASES:=.cpptest): DOXYGEN_COMMENT_PARSER := $(srcdir)/CommentParser.java
# Compiles java files then runs the testcase. A testcase is only run if
# a file is found which has _runme.java appended after the testcase name.
# Note Java uses LD_LIBRARY_PATH under Unix, PATH under Cygwin/Windows, SHLIB_PATH on HPUX and DYLD_LIBRARY_PATH on Mac OS X.
run_testcase = \
cd $(JAVA_PACKAGE) && $(COMPILETOOL) $(JAVAC) -classpath . `find . -name "*.java"` && cd .. && \
if [ -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \
$(COMPILETOOL) $(JAVAC) -classpath $(JAVA_CLASSPATH) -d . $(DOXYGEN_COMMENT_PARSER) $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) && \
env LD_LIBRARY_PATH="$(JAVA_PACKAGE):$$LD_LIBRARY_PATH" PATH="$(JAVA_PACKAGE):$$PATH" SHLIB_PATH="$(JAVA_PACKAGE):$$SHLIB_PATH" DYLD_LIBRARY_PATH="$(JAVA_PACKAGE):$$DYLD_LIBRARY_PATH" $(RUNTOOL) $(JAVA) $(JAVAFLAGS) -classpath $(JAVA_CLASSPATH) $*_runme; \
fi
# Clean: remove testcase directories
%.clean:
@if [ -d $(JAVA_PACKAGE) ]; then \
rm -rf $(JAVA_PACKAGE); \
fi
clean:
@rm -f *.class hs_err*.log