Commit 9916633b authored by Ophélie Gagnard's avatar Ophélie Gagnard

installation/metadata-collect-agent/Makefile: Re-enable the $PYTHON_PATH and...

installation/metadata-collect-agent/Makefile: Re-enable the $PYTHON_PATH and $INCLUDE_PYTHON arguments.
parent 0d2392e7
INCLUDE_PYTHON=-I$(shell python3 -c "import sysconfig; print(sysconfig.get_path('include'))")
#ifneq ($(PYTHON_PATH),) # this is for buildouts
#INCLUDE_PYTHON=-I$(shell python3 -c "import sysconfig; print(sysconfig.get_path('include'))")
ifeq ($(INCLUDE_PYTHON),)
ifneq ($(PYTHON_PATH),) # this is for buildouts
#INCLUDE_PYTHON=-I$(shell python3 -c "import sysconfig; print(sysconfig.get_path('include'))")
#INCLUDE_PYTHON=-I$(shell $(PYTHON_PATH)/bin/python3 -c "from sysconfig import get_paths; print(get_paths()['include'])")
#endif
#ifeq ($(INCLUDE_PYTHON),) # default behavior to get python includes path
INCLUDE_PYTHON=-I$(shell $(PYTHON_PATH)/bin/python3 -c "from sysconfig import get_paths; print(get_paths()['include'])")
endif
ifeq ($(INCLUDE_PYTHON),) # default behavior to get python includes path
# INCLUDE_PYTHON = $(shell pkg-config --cflags python3 | cut -f 1 -d " ")
#endif
INCLUDE_PYTHON=-I$(shell python3 -c "import sysconfig; print(sysconfig.get_path('include'))")
endif
endif
ifneq ($(FMTLIB_PATH),)
INCLUDE_FMTLIB = -I$(FMTLIB_PATH)/include
......@@ -53,8 +56,10 @@ all: metadata-collect-agent
@rm -f $(subst .cpp,.h,$@)
fake_python.c: main.cpp
echo # DEBUG
$(info "[Generating fake_python.c]")
@echo "[Generating fake_python.c]"
echo # DEBUG
mkdir -p logs
#-g++ -O2 -g -Wno-unused-result -Wsign-compare -pthread $(INCLUDE_DIRS) main.cpp -o main 2> logs/link_errors
-$(LINK.cpp) $^ $(INCLUDE_DIRS) $(LOADLIBES) $(LDLIBS) -o $@ 2> logs/link_errors
......@@ -66,8 +71,13 @@ fake_python.o: fake_python.c
gcc -c fake_python.c -o fake_python.o
metadata-collect-agent: main.cpp fake_python.o
echo # DEBUG
echo PYTHON_PATH = $(PYTHON_PATH) INCLUDE_PYTHON = $(INCLUDE_PYTHON)
echo # DEBUG
$(info "[C++ Compiling $^ -> $@]")
echo # DEBUG
@echo "[C++ Compiling $^ -> $@]"
echo # DEBUG
$(info LINK.cpp = $(LINK.cpp))
$(info ^ = $^)
$(info LOADLIBES = $(LOADLIBES))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment