Rework swig_and_compile_multi_cpp makefile helper
Seems less cryptic and more maintainable to me
This commit is contained in:
parent
3ab288dfa4
commit
f2dd436a5b
2 changed files with 12 additions and 7 deletions
|
|
@ -831,6 +831,13 @@ endif
|
|||
partialcheck:
|
||||
$(MAKE) check CC=true CXX=true LDSHARED=true CXXSHARED=true RUNTOOL=true COMPILETOOL=true
|
||||
|
||||
swig_and_compile_cpp_helper = \
|
||||
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' \
|
||||
SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
|
||||
LIBS='$(LIBS)' INCLUDES='$(INCLUDES)' SWIGOPT=$(2) NOLINK=true \
|
||||
TARGET="$(TARGETPREFIX)$(1)$(TARGETSUFFIX)" INTERFACEDIR='$(INTERFACEDIR)' INTERFACE="$(1).i" \
|
||||
$(LANGUAGE)$(VARIANT)_cpp
|
||||
|
||||
swig_and_compile_cpp = \
|
||||
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' \
|
||||
SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
|
||||
|
|
@ -847,12 +854,7 @@ swig_and_compile_c = \
|
|||
|
||||
swig_and_compile_multi_cpp = \
|
||||
for f in `cat $(top_srcdir)/$(EXAMPLES)/$(TEST_SUITE)/$*.list` ; do \
|
||||
swigopt=$$(name=SWIGOPT_$$f; eval echo \$$$$name); \
|
||||
$(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile SRCDIR='$(SRCDIR)' CXXSRCS='$(CXXSRCS)' \
|
||||
SWIG_LIB_DIR='$(SWIG_LIB_DIR)' SWIGEXE='$(SWIGEXE)' \
|
||||
LIBS='$(LIBS)' INCLUDES='$(INCLUDES)' SWIGOPT="$${swigopt:-$(SWIGOPT)}" NOLINK=true \
|
||||
TARGET="$(TARGETPREFIX)$${f}$(TARGETSUFFIX)" INTERFACEDIR='$(INTERFACEDIR)' INTERFACE="$$f.i" \
|
||||
$(LANGUAGE)$(VARIANT)_cpp; \
|
||||
$(call swig_and_compile_cpp_helper,$${f},'$(SWIGOPT)'); \
|
||||
done
|
||||
|
||||
swig_and_compile_external = \
|
||||
|
|
|
|||
|
|
@ -105,9 +105,12 @@ VALGRIND_OPT += --suppressions=pythonswig.supp
|
|||
# Custom tests - tests with additional commandline options
|
||||
#python_flatstaticmethod.cpptest: SWIGOPT += -flatstaticmethod
|
||||
|
||||
# Make sure just python_runtime_data_builtin.i uses the -builtin option. Note: does not use python_runtime_data.list for all steps.
|
||||
python_runtime_data.multicpptest: override SWIG_FEATURES := $(filter-out -builtin,$(SWIG_FEATURES))
|
||||
python_runtime_data.multicpptest: override SWIGOPT := $(filter-out -builtin,$(SWIGOPT))
|
||||
python_runtime_data.multicpptest: export SWIGOPT_python_runtime_data_builtin = $(SWIGOPT) -builtin
|
||||
python_runtime_data.multicpptest: swig_and_compile_multi_cpp = \
|
||||
$(call swig_and_compile_cpp_helper,python_runtime_data_builtin,'$(SWIGOPT) -builtin') && \
|
||||
$(call swig_and_compile_cpp_helper,python_runtime_data_nobuiltin,'$(SWIGOPT)')
|
||||
|
||||
# Rules for the different types of tests
|
||||
%.cpptest:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue