From: <ne...@us...> - 2012-07-23 15:55:10
|
Revision: 13357 http://swig.svn.sourceforge.net/swig/?rev=13357&view=rev Author: neha1 Date: 2012-07-23 15:55:04 +0000 (Mon, 23 Jul 2012) Log Message: ----------- Adapted test-suite Makefile to build javascript executable. From: Oliver Buchtala <oli...@go...> Modified Paths: -------------- branches/gsoc2012-javascript/Examples/test-suite/javascript/Makefile branches/gsoc2012-javascript/Examples/test-suite/javascript/Makefile.in Modified: branches/gsoc2012-javascript/Examples/test-suite/javascript/Makefile =================================================================== --- branches/gsoc2012-javascript/Examples/test-suite/javascript/Makefile 2012-07-23 15:54:31 UTC (rev 13356) +++ branches/gsoc2012-javascript/Examples/test-suite/javascript/Makefile 2012-07-23 15:55:04 UTC (rev 13357) @@ -3,11 +3,14 @@ ####################################################################### LANGUAGE = javascript -JAVASCRIPT = ../../../Tools/javascript/javascript +JAVASCRIPT_EXE = ../../../Tools/javascript/javascript +JAVASCRIPT_EXE_SRC = ../../../Tools/javascript/javascript.cxx SCRIPTSUFFIX = _runme.js srcdir = . top_srcdir = ../../.. top_builddir = ../../.. +JS_INCLUDE = -I"/usr/include/webkitgtk-1.0/" +JS_DLNK = -L/usr/lib/ -ljavascriptcoregtk-1.0 #CPP_TEST_CASES = #C_TEST_CASES += @@ -18,18 +21,21 @@ # Custom tests - tests with additional commandline options +javascript_exe: + $(CXX) $(CXXFLAGS) $(JS_INCLUDE) $(JAVASCRIPT_EXE_SRC) $(LIBS) $(JS_DLNK) -g -o $(JAVASCRIPT_EXE) + # Rules for the different types of tests -%.cpptest: +%.cpptest: javascript_exe $(setup) +$(swig_and_compile_cpp) $(run_testcase) -%.ctest: +%.ctest: javascript_exe $(setup) +$(swig_and_compile_c) $(run_testcase) -%.multicpptest: +%.multicpptest: javascript_exe $(setup) +$(swig_and_compile_multi_cpp) $(run_testcase) @@ -38,7 +44,7 @@ # a file is found which has _runme.js appended after the testcase name. run_testcase = \ if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \ - env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(JAVASCRIPT) -l $* $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \ + env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(JAVASCRIPT_EXE) -l $* $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \ fi # Clean Modified: branches/gsoc2012-javascript/Examples/test-suite/javascript/Makefile.in =================================================================== --- branches/gsoc2012-javascript/Examples/test-suite/javascript/Makefile.in 2012-07-23 15:54:31 UTC (rev 13356) +++ branches/gsoc2012-javascript/Examples/test-suite/javascript/Makefile.in 2012-07-23 15:55:04 UTC (rev 13357) @@ -3,11 +3,14 @@ ####################################################################### LANGUAGE = javascript -JAVASCRIPT = ../../../Tools/javascript/javascript +JAVASCRIPT_EXE = ../../../Tools/javascript/javascript +JAVASCRIPT_EXE_SRC = ../../../Tools/javascript/javascript.cxx SCRIPTSUFFIX = _runme.js srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ +JS_INCLUDE = @JSCOREINC@ +JS_DLNK = @JSCOREDYNAMICLINKING@ #CPP_TEST_CASES = #C_TEST_CASES += @@ -18,18 +21,21 @@ # Custom tests - tests with additional commandline options +javascript_exe: + $(CXX) $(CXXFLAGS) $(JS_INCLUDE) $(JAVASCRIPT_EXE_SRC) $(LIBS) $(JS_DLNK) -g -o $(JAVASCRIPT_EXE) + # Rules for the different types of tests -%.cpptest: +%.cpptest: javascript_exe $(setup) +$(swig_and_compile_cpp) $(run_testcase) -%.ctest: +%.ctest: javascript_exe $(setup) +$(swig_and_compile_c) $(run_testcase) -%.multicpptest: +%.multicpptest: javascript_exe $(setup) +$(swig_and_compile_multi_cpp) $(run_testcase) @@ -38,7 +44,7 @@ # a file is found which has _runme.js appended after the testcase name. run_testcase = \ if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then \ - env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(JAVASCRIPT) -l $* $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \ + env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(JAVASCRIPT_EXE) -l $* $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \ fi # Clean This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |