From 5e3bcf20be6188331c856d9d8854fb931b2abba7 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 20 Jan 2016 14:34:00 +0100 Subject: Avoid incorrect include dirs when building python modules --- build/linux/Makefile.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'build/linux') diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in index 4f99db2..c165d37 100644 --- a/build/linux/Makefile.in +++ b/build/linux/Makefile.in @@ -32,7 +32,6 @@ NVCCFLAGS=@SAVED_NVCCFLAGS@ LDFLAGS=@SAVED_LDFLAGS@ LIBS=@SAVED_LIBS@ -CPPFLAGS+=-I$(srcdir)/../.. -I$(srcdir)/../../include -I$(srcdir)/../../lib/include CXXFLAGS+=-g -O3 -Wall -Wshadow LIBS+=-lpthread LDFLAGS+=-g @@ -59,7 +58,7 @@ PYLIBDIR = $(shell $(PYTHON) -c 'from distutils.sysconfig import get_config_var; PYINCDIR = $(shell $(PYTHON) -c 'from distutils.sysconfig import get_python_inc; import six; six.print_(get_python_inc())') PYLIBVER = `basename $(PYINCDIR)` CPPFLAGS += -DASTRA_PYTHON -I$(PYINCDIR) -PYCPPFLAGS = $(CPPFLAGS) +PYCPPFLAGS := $(CPPFLAGS) PYCPPFLAGS += -I../include PYLDFLAGS = $(LDFLAGS) PYLDFLAGS += -L$(abs_top_builddir)/.libs @@ -67,6 +66,10 @@ LIBS += -l$(PYLIBVER) LDFLAGS += -L$(PYLIBDIR) endif +# This is below where PYCPPFLAGS copies CPPFLAGS. The python code is built +# from a different directory, so these relative includes would be wrong. +CPPFLAGS+=-I$(srcdir)/../.. -I$(srcdir)/../../include -I$(srcdir)/../../lib/include + BOOST_CPPFLAGS= BOOST_LDFLAGS= -- cgit v1.2.3