diff options
author | Jan Jezabek <jezabek@poczta.onet.pl> | 2008-08-28 21:29:56 +0000 |
---|---|---|
committer | Jan Jezabek <jezabek@poczta.onet.pl> | 2008-08-28 21:29:56 +0000 |
commit | 3f8a63239beef1477206df823a95aeaa8a2f0db9 (patch) | |
tree | 384cf3853d21c07eda93280da4a9ffa1396f4a2b | |
parent | 67d36558dbe2ff7da74d8ce3f14ecc43dd8dad76 (diff) | |
download | swig-3f8a63239beef1477206df823a95aeaa8a2f0db9.tar.gz |
Fixed throw_exception test. Minor build system tweaks.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-jezabek@10800 626c5289-ae23-0410-ae9c-e8d60b6d4f22
-rw-r--r-- | Examples/test-suite/com/Makefile.in | 17 | ||||
-rw-r--r-- | Examples/test-suite/com/throw_exception_runme.c | 2 | ||||
-rw-r--r-- | Examples/test-suite/com/throw_exception_runme.vbs | 2 | ||||
-rw-r--r-- | Examples/test-suite/com/virtual_poly_runme.c | 2 | ||||
-rw-r--r-- | configure.in | 2 |
5 files changed, 15 insertions, 10 deletions
diff --git a/Examples/test-suite/com/Makefile.in b/Examples/test-suite/com/Makefile.in index c8ac7297b..00ae74d30 100644 --- a/Examples/test-suite/com/Makefile.in +++ b/Examples/test-suite/com/Makefile.in @@ -31,7 +31,8 @@ include $(srcdir)/../common.mk +(cd $* && $(swig_and_compile_cpp)) +$(generate_headers) +(cd $* && $(register_component)) - +$(run_testcase) + +$(run_c_testcase) + +$(run_vbs_testcase) +(cd $* && $(unregister_component)) %.ctest: @@ -39,7 +40,8 @@ include $(srcdir)/../common.mk +(cd $* && $(swig_and_compile_c)) +$(generate_headers) +(cd $* && $(register_component)) - +$(run_testcase) + +$(run_c_testcase) + +$(run_vbs_testcase) +(cd $* && $(unregister_component)) %.multicpptest: @@ -47,7 +49,8 @@ include $(srcdir)/../common.mk +(cd $* && $(swig_and_compile_multi_cpp)) +$(generate_headers) +(cd $* && $(register_component)) - +$(run_testcase) + +$(run_c_testcase) + +$(run_vbs_testcase) +(cd $* && $(unregister_component)) # Makes a directory for the testcase if it does not exist @@ -74,16 +77,18 @@ generate_headers = \ # Compiles COM files then runs the testcase. A testcase is only run if # a file is found which has _runme.c appended after the testcase name. -run_testcase = \ +run_c_testcase = \ if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then ( \ $(MAKE) -f $*/$(top_builddir)/$(EXAMPLES)/Makefile \ TARGET='$*_runme.exe' \ COMSRCS='`$(COM_CYGPATH_W) $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) $(srcdir)/$*/$*_i.c`' \ com_compile && \ $(RUNTOOL) $(COM_RUNTOOL) $(srcdir)/$*_runme.exe$(COM_EXEC_SUFFIX); ) \ - fi; \ + fi; + +run_vbs_testcase = \ if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX2) ]; then ( \ - $(RUNTOOL) $(COM_CSCRIPT) $(COM_CSCRIPT_SWITCHES) `$(COM_CYGPATH_W) $(srcdir)/$*_runme.vbs` )\ + $(RUNTOOL) $(COM_CSCRIPT) $(COM_CSCRIPT_SWITCHES) `$(COM_CYGPATH_W) $(srcdir)/$*_runme.vbs`; )\ fi; diff --git a/Examples/test-suite/com/throw_exception_runme.c b/Examples/test-suite/com/throw_exception_runme.c index d701e4b76..e0ac8975e 100644 --- a/Examples/test-suite/com/throw_exception_runme.c +++ b/Examples/test-suite/com/throw_exception_runme.c @@ -31,7 +31,7 @@ void check_message(wchar_t *expected_msg) { CoTaskMemFree(descr - 2); } -int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { +int main() { Ithrow_exception *te = NULL; IFooStatic *fs = NULL; IFoo *foo = NULL; diff --git a/Examples/test-suite/com/throw_exception_runme.vbs b/Examples/test-suite/com/throw_exception_runme.vbs index c8cda2135..9a5acaf35 100644 --- a/Examples/test-suite/com/throw_exception_runme.vbs +++ b/Examples/test-suite/com/throw_exception_runme.vbs @@ -4,7 +4,7 @@ Set te = CreateObject("throw_exception.throw_exception") Set foo = te.Foo.new_Foo() -Rem On Error Resume Next +On Error Resume Next foo.test_int() diff --git a/Examples/test-suite/com/virtual_poly_runme.c b/Examples/test-suite/com/virtual_poly_runme.c index ee6b193ea..784521d33 100644 --- a/Examples/test-suite/com/virtual_poly_runme.c +++ b/Examples/test-suite/com/virtual_poly_runme.c @@ -13,7 +13,7 @@ #include "virtual_poly/virtual_poly_generated.h" -int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { +int main() { Ivirtual_poly *vp = NULL; INDoubleStatic *nds = NULL; INIntStatic *nis = NULL; diff --git a/configure.in b/configure.in index d963bc7a2..e099e6173 100644 --- a/configure.in +++ b/configure.in @@ -1922,7 +1922,7 @@ fi if test "gcc" = "$COM_CC" -o "i586-mingw32msvc-gcc" = "$COM_CC" -o "winegcc" = "$COM_CC" ; then COM_CC_SHARED_SWITCHES='-shared -mno-cygwin' COM_CC_OUT_SWITCHES='-o ' - COM_CC_SWITCHES=-mno-cygwin + COM_CC_SWITCHES='-mno-cygwin -mconsole' COM_LIBS='-lole32 -luuid -ladvapi32 -loleaut32' if test "winegcc" = "$COM_CC" ; then COM_EXEC_SUFFIX=.so |