Skip to content

Commit

Permalink
fix SWIG_DOXYGEN; add SWIG_PY_DOXYGEN
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurent Perron committed Jun 29, 2019
1 parent b6f820b commit 177bdaf
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -140,7 +140,7 @@ else
@echo
endif

print-% : ; @echo $* = $($*)
print-% : ; @echo $* = \'$($*)\'

.PHONY: FORCE
FORCE:
9 changes: 9 additions & 0 deletions makefiles/Makefile.python.mk
Expand Up @@ -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)
Expand Down
10 changes: 7 additions & 3 deletions makefiles/Makefile.third_party.unix.mk
Expand Up @@ -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),)
ifeq ($(shell "$(PYTHON_EXECUTABLE)" -c "from sys import version_info as v; print (str(v[0]))"),3)
SWIG_PY_DOXYGEN = -doxygen
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)
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:
Expand Down

0 comments on commit 177bdaf

Please sign in to comment.