diff --git a/Makefile b/Makefile index 4b8cd483ee..d71c6c9d2b 100755 --- a/Makefile +++ b/Makefile @@ -140,7 +140,7 @@ else @echo endif -print-% : ; @echo $* = $($*) +print-% : ; @echo $* = \'$($*)\' .PHONY: FORCE FORCE: diff --git a/makefiles/Makefile.python.mk b/makefiles/Makefile.python.mk index 8d92576cfa..3b5abc71b9 100755 --- a/makefiles/Makefile.python.mk +++ b/makefiles/Makefile.python.mk @@ -36,6 +36,15 @@ PYTHON3_CFLAGS := -DPY3 endif endif +# Set -doxygen tag for swig if possible +ifeq ("$(SWIG_VERSION)","4.0.0") + ifneq ("$(PYTHON_EXECUTABLE)","") + ifeq ($(shell "$(PYTHON_EXECUTABLE)" -c "from sys import version_info as v; print (str(v[0]))"),3) +SWIG_PY_DOXYGEN = -doxygen + endif + endif +endif + # All libraries and dependecies PYALGORITHMS_LIBS = $(LIB_DIR)/_pywrapknapsack_solver.$(SWIG_PYTHON_LIB_SUFFIX) PYGRAPH_LIBS = $(LIB_DIR)/_pywrapgraph.$(SWIG_PYTHON_LIB_SUFFIX) diff --git a/makefiles/Makefile.third_party.unix.mk b/makefiles/Makefile.third_party.unix.mk index a2540402e6..3d5615bcef 100644 --- a/makefiles/Makefile.third_party.unix.mk +++ b/makefiles/Makefile.third_party.unix.mk @@ -764,12 +764,16 @@ SWIG_BINARY = $(shell $(WHICH) $(UNIX_SWIG_BINARY)) SWIG_VERSION = $(shell $(SWIG_BINARY) -version | grep Version | cut -d " " -f 3) ifeq ("$(SWIG_VERSION)","4.0.0") SWIG_DOXYGEN = -doxygen -ifneq ($(PYTHON_EXECUTABLE),) +endif + +test_doxy: +ifneq ("$(PYTHON_EXECUTABLE)","") + echo "Pass 1" ifeq ($(shell "$(PYTHON_EXECUTABLE)" -c "from sys import version_info as v; print (str(v[0]))"),3) -SWIG_PY_DOXYGEN = -doxygen -endif + echo "SWIG_PY_DOXYGEN = -doxygen" endif endif + echo \'$(shell "$(PYTHON_EXECUTABLE)" -c "from sys import version_info as v; print (str(v[0]))")\' .PHONY: clean_third_party # Clean everything. Remember to also delete archived dependencies, i.e. in the event of download failure, etc. clean_third_party: