Some delayed maintenance.

Fixes for multimodule targets.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6407 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Art Yerkes 2004-10-17 07:56:17 +00:00
commit db57b0d6d8
14 changed files with 165 additions and 142 deletions

View file

@ -1,5 +1,8 @@
enum GlobalEnum { globalenum1=1, globalenum2 };
/* This function should be static as it will be emitted into the code for
* every module. All _static targets would fail here with a multiple
* definition if this is not static. */
GlobalEnum global_test(GlobalEnum e) { return e; }
class A {

View file

@ -13,9 +13,13 @@ top_builddir = @top_builddir@
C_TEST_CASES =
run_testcase = \
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then ( \
if [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) -a \
-f $(top_srcdir)/Examples/test-suite/$*.list ] ; then ( \
ocamlc -c $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
ocamlc swig.cmo -custom -g -cc '$(CXX)' -o runme $(srcdir)/$*\.cmo $(srcdir)/$*\_runme.cmo $(srcdir)/$*\_wrap.o && \
ocamlc swig.cmo -custom -g -cc '$(CXX)' -o runme `cat $(top_srcdir)/Examples/test-suite/$(*).list | sed -e 's/\(.*\)/\1_wrap.o \1.cmo/g'`&& ./runme) ; \
elif [ -f $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX) ]; then ( \
ocamlc -c $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); \
ocamlc swig.cmo -custom -g -cc '$(CXX)' -o runme $(srcdir)/$(*)_runme.cmo $(srcdir)/$(*)_wrap.o && \
./runme) ; \
fi ;
@ -61,10 +65,10 @@ include $(srcdir)/../common.mk
%.multicpptest:
echo $@ >> testing
$(setup) \
($(swig_and_compile_multi_cpp); ) && \
$(setup) \
$(run_testcase) \
if [ -f $(@:%.multicpptest=%_a_wrap.o) ] ; then \
if [ -f $(@:%.multicpptest=%_runtime_wrap.o) ] ; then \
echo $@ >> success ; \
fi
@ -74,4 +78,3 @@ include $(srcdir)/../common.mk
clean:
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile ocaml_clean