From 61d95e4d4cabcc1da959ccf68588895862ec64c5 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Tue, 19 Jan 2016 15:54:08 +0100 Subject: Place Python build/temporary files in build directory This also allows out-of-tree builds for Python. --- build/linux/Makefile.in | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'build') diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in index 90f8801..4f99db2 100644 --- a/build/linux/Makefile.in +++ b/build/linux/Makefile.in @@ -268,12 +268,15 @@ endif ifeq ($(python),yes) py: libastra.la - cd $(srcdir)/../../python; CPPFLAGS="${PYCPPFLAGS}" LDFLAGS="${PYLDFLAGS}" $(PYTHON) builder.py install \ - --install-base=./finalbuild --install-headers=./finalbuild --install-purelib=./finalbuild \ - --install-platlib=./finalbuild --install-scripts=./finalbuild --install-data=./finalbuild + $(MKDIR) python/build + $(MKDIR) python/finalbuild + cd $(srcdir)/../../python; CPPFLAGS="${PYCPPFLAGS}" LDFLAGS="${PYLDFLAGS}" $(PYTHON) builder.py build --build-base=$(abs_top_builddir)/python/build install \ + --install-base=$(abs_top_builddir)/python/finalbuild --install-headers=$(abs_top_builddir)/python/finalbuild --install-purelib=$(abs_top_builddir)/python/finalbuild \ + --install-platlib=$(abs_top_builddir)/python/finalbuild --install-scripts=$(abs_top_builddir)/python/finalbuild --install-data=$(abs_top_builddir)/python/finalbuild python-root-install: libastra.la - cd $(srcdir)/../../python; CPPFLAGS="${PYCPPFLAGS}" LDFLAGS="${PYLDFLAGS}" $(PYTHON) builder.py install + $(MKDIR) python/build + cd $(srcdir)/../../python; CPPFLAGS="${PYCPPFLAGS}" LDFLAGS="${PYLDFLAGS}" $(PYTHON) builder.py build --build-base=$(abs_top_builddir)/python/build install endif @@ -335,8 +338,8 @@ clean: rm -f $(addsuffix /*.d,$(DEPDIRS)) rm -f $(addsuffix /*,$(LIBDIRS)) rm -f $(TEST_OBJECTS) test.bin - rm -fr $(srcdir)/../../python/finalbuild/ - rm -fr $(srcdir)/../../python/build/ + rm -fr python/finalbuild/ + rm -fr python/build/ rm -f $(srcdir)/../../python/astra/*.cpp rm -f $(srcdir)/../../python/astra/*.c @@ -372,9 +375,9 @@ ifeq ($(python),yes) install-python: py $(INSTALL_SH) -m 755 -d @prefix@/python $(INSTALL_SH) -m 755 -d @prefix@/python/astra - $(INSTALL_SH) -m 644 $(srcdir)/../../python/finalbuild/astra/*.so @prefix@/python/astra - $(INSTALL_SH) -m 644 $(srcdir)/../../python/finalbuild/astra/*.py @prefix@/python/astra - $(INSTALL_SH) -m 644 $(srcdir)/../../python/finalbuild/*.egg-info @prefix@/python/ + $(INSTALL_SH) -m 644 python/finalbuild/astra/*.so @prefix@/python/astra + $(INSTALL_SH) -m 644 python/finalbuild/astra/*.py @prefix@/python/astra + $(INSTALL_SH) -m 644 python/finalbuild/*.egg-info @prefix@/python/ @echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" @echo "To use ASTRA in Python, add @prefix@/python/ to your PYTHONPATH" @echo "and @libdir@ to your LD_LIBRARY_PATH." -- cgit v1.2.3