Further makefile refactoring for multicpptests
This commit is contained in:
parent
d1b93f2c0e
commit
c5f209706e
2 changed files with 13 additions and 37 deletions
|
|
@ -814,6 +814,8 @@ check-cpp: $(CPP_TEST_CASES:=.cpptest)
|
|||
|
||||
check-cpp11: $(CPP11_TEST_CASES:=.cpptest)
|
||||
|
||||
check-multicpp: $(MULTI_CPP_TEST_CASES:=.multicpptest)
|
||||
|
||||
ifdef HAS_DOXYGEN
|
||||
check-doxygen: $(DOXYGEN_TEST_CASES:=.cpptest)
|
||||
endif
|
||||
|
|
|
|||
|
|
@ -43,17 +43,9 @@ INCLUDES = -I$(abs_top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)
|
|||
|
||||
%.multicpptest:
|
||||
$(setup)
|
||||
mkdir -p gopath/$*/src 2>/dev/null || true
|
||||
if ! test -d gopath/$*/src/swigtests; then \
|
||||
(cd gopath/$*/src && ln -s . swigtests); \
|
||||
fi
|
||||
$(call go_multicpp_setup,$*)
|
||||
+for f in `cat $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$*.list` ; do \
|
||||
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' \
|
||||
SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
|
||||
LIBS='$(LIBS)' INCLUDES='$(INCLUDES)' SWIGOPT='$(SWIGOPT)' NOLINK=true \
|
||||
TARGET="$(TARGETPREFIX)$${f}$(TARGETSUFFIX)" INTERFACEDIR='$(INTERFACEDIR)' INTERFACE="$$f.i" \
|
||||
GOMOD="$*" \
|
||||
$(LANGUAGE)$(VARIANT)_cpp; \
|
||||
$(call swig_and_compile_cpp_helper,$${f},'$(SWIGOPT)') GOMOD="$*"; \
|
||||
done
|
||||
$(run_multi_testcase)
|
||||
|
||||
|
|
@ -61,28 +53,9 @@ li_windows.cpptest:
|
|||
# Does not work because go build won't build li_windows.go,
|
||||
# because file names with "windows" are only built on Windows.
|
||||
|
||||
multi_import.multicpptest:
|
||||
$(setup)
|
||||
mkdir -p gopath/multi_import/src 2>/dev/null || true
|
||||
if ! test -d gopath/multi_import/src/swigtests; then \
|
||||
(cd gopath/multi_import/src && ln -s . swigtests); \
|
||||
fi
|
||||
for f in multi_import_d multi_import_b multi_import_a; do \
|
||||
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' \
|
||||
SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
|
||||
LIBS='$(LIBS)' INCLUDES='$(INCLUDES)' SWIGOPT='$(SWIGOPT)' NOLINK=true \
|
||||
TARGET="$(TARGETPREFIX)$${f}$(TARGETSUFFIX)" INTERFACEDIR='$(INTERFACEDIR)' INTERFACE="$$f.i" \
|
||||
GOMOD="multi_import" \
|
||||
$(LANGUAGE)$(VARIANT)_cpp; \
|
||||
done
|
||||
$(run_multi_testcase)
|
||||
|
||||
go_subdir_import.multicpptest:
|
||||
$(setup)
|
||||
mkdir -p gopath/go_subdir_import/src 2>/dev/null || true
|
||||
if ! test -d gopath/go_subdir_import/src/swigtests; then \
|
||||
(cd gopath/go_subdir_import/src && ln -s . swigtests); \
|
||||
fi
|
||||
$(call go_multicpp_setup,go_subdir_import)
|
||||
mkdir -p testdir/go_subdir_import 2>/dev/null || true
|
||||
mkdir -p gopath/go_subdir_import/src/testdir/go_subdir_import 2>/dev/null || true
|
||||
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' \
|
||||
|
|
@ -93,16 +66,17 @@ go_subdir_import.multicpptest:
|
|||
INTERFACE='testdir/go_subdir_import/go_subdir_import_b.i' \
|
||||
GOMOD="go_subdir_import" \
|
||||
$(LANGUAGE)$(VARIANT)_cpp;
|
||||
for f in testdir/go_subdir_import/go_subdir_import_c go_subdir_import_a ; do \
|
||||
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' \
|
||||
SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
|
||||
LIBS='$(LIBS)' INCLUDES='$(INCLUDES)' SWIGOPT='$(SWIGOPT)' NOLINK=true \
|
||||
TARGET="$(TARGETPREFIX)$${f}$(TARGETSUFFIX)" INTERFACEDIR='$(INTERFACEDIR)' INTERFACE="$$f.i" \
|
||||
GOMOD="go_subdir_import" \
|
||||
$(LANGUAGE)$(VARIANT)_cpp; \
|
||||
+for f in testdir/go_subdir_import/go_subdir_import_c go_subdir_import_a ; do \
|
||||
$(call swig_and_compile_cpp_helper,$${f},'$(SWIGOPT)') GOMOD="go_subdir_import"; \
|
||||
done
|
||||
$(run_multi_testcase)
|
||||
|
||||
go_multicpp_setup = \
|
||||
mkdir -p gopath/$*/src 2>/dev/null || true; \
|
||||
if ! test -d gopath/$*/src/swigtests; then \
|
||||
(cd gopath/$*/src && ln -s . swigtests); \
|
||||
fi
|
||||
|
||||
# Runs the testcase.
|
||||
run_testcase = \
|
||||
if test -f $(SCRIPTDIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX); then \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue