File: Makefile.in

package info (click to toggle)
swig1.3 1.3.24-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 19,336 kB
  • ctags: 10,604
  • sloc: cpp: 27,917; ansic: 24,160; yacc: 4,412; python: 4,255; java: 4,156; makefile: 3,735; sh: 3,552; cs: 2,250; ruby: 2,150; lisp: 1,605; tcl: 1,136; perl: 980; php: 879; ml: 825
file content (81 lines) | stat: -rw-r--r-- 2,234 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#######################################################################
# $Header: /cvsroot/swig/SWIG/Examples/test-suite/java/Makefile.in,v 1.7 2004/09/10 22:25:02 wsfulton Exp $
# Makefile for java test-suite
#######################################################################

LANGUAGE     = java
SCRIPTSUFFIX = _runme.java
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 \
	java_constants \
	java_enums \
	java_lib_various \
	java_jnitypes \
	java_pragmas \
	java_throws \
	java_typemaps_proxy \
	java_typemaps_typewrapper

# This testcase requires Java 1.5
#	enum_thorough_proper \

include $(srcdir)/../common.mk

# Overridden variables here
SWIGOPT += -package $*

# Rules for the different types of tests
%.cpptest: 
	$(setup) \
	(cd $*; $(swig_and_compile_cpp); ) && \
	$(run_testcase)

%.ctest:
	$(setup) \
	(cd $*; $(swig_and_compile_c); ) && \
	$(run_testcase)

%.multicpptest: 
	$(setup) \
	(cd $*; $(swig_and_compile_multi_cpp); ) && \
	$(run_testcase)

# Makes a directory for the testcase if it does not exist
setup = \
	if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then	  \
	  echo "Checking testcase $* (with run test) under $(LANGUAGE)" ; \
	else								  \
	  echo "Checking testcase $* under $(LANGUAGE)" ;		  \
	fi;								  \
	if [ ! -d $* ]; then						  \
		mkdir $*;						  \
	fi;

# 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 $* && javac *.java; ) && \
	if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then (	  \
	  javac -d . $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) && 	  \
	  env LD_LIBRARY_PATH="$*:$$LD_LIBRARY_PATH" PATH="$*:$$PATH" SHLIB_PATH="$*:$$SHLIB_PATH" DYLD_LIBRARY_PATH="$*:$$DYLD_LIBRARY_PATH" java $*\_runme;) \
	fi;

# Clean: remove testcase directories
%.clean:
	@if [ -d $* ]; then \
		rm -rf $*; \
	fi;

clean:
	@rm -f *.class