From 49babc8dca0eefbbdd56ef01839b9a80c62844f4 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Mon, 14 Dec 2009 13:50:39 +0100 Subject: Build python modules in builddir This requires increasing the required autoconf version to 2.59 for use of $(abs_builddir). Fix uninstallation of python files as well --- server/Makefile.am | 15 ++++++++++++--- server/configure.ac | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'server') diff --git a/server/Makefile.am b/server/Makefile.am index 0cd320dd..95d78ef8 100644 --- a/server/Makefile.am +++ b/server/Makefile.am @@ -807,15 +807,24 @@ installsssddirs:: $(DESTDIR)$(logpath) \ $(DESTDIR)$(pubconfpath) +all-local: + cd $(srcdir)/config; $(PYTHON) setup.py build --build-base $(abs_builddir)/config + install-exec-hook: installsssddirs if [ "$(DESTDIR)" = "" ]; then \ - cd $(srcdir)/config; $(PYTHON) setup.py install --prefix=$(PYTHON_PREFIX); \ + cd $(srcdir)/config; $(PYTHON) setup.py build --build-base $(abs_builddir)/config install --prefix=$(PYTHON_PREFIX) --record=$(abs_builddir)/config/.files; \ else \ - cd $(srcdir)/config; $(PYTHON) setup.py install --prefix=$(PYTHON_PREFIX) --root=$(DESTDIR); \ + cd $(srcdir)/config; $(PYTHON) setup.py build --build-base $(abs_builddir)/config install --prefix=$(PYTHON_PREFIX) --root=$(DESTDIR) --record=$(abs_builddir)/config/.files; \ + fi + +uninstall-hook: + if [ -f $(abs_builddir)/config/.files ]; then \ + cat $(abs_builddir)/config/.files | xargs -iq rm -f $(DESTDIR)/q; \ + rm $(abs_builddir)/config/.files ; \ fi clean-local: - cd $(srcdir)/config; $(PYTHON) setup.py clean --all + cd $(srcdir)/config; $(PYTHON) setup.py build --build-base $(abs_builddir)/config clean --all CLEANFILES = *.X */*.X */*/*.X diff --git a/server/configure.ac b/server/configure.ac index 2c788460..72b15cd0 100644 --- a/server/configure.ac +++ b/server/configure.ac @@ -1,4 +1,4 @@ -AC_PREREQ(2.50) +AC_PREREQ(2.59) AC_DEFUN([AC_CHECK_LIB_EXT], [ AC_CHECK_LIB([$1],[$3],[$4],[$5],[$7]) ac_cv_lib_ext_$1_$3=$ac_cv_lib_$1_$3 -- cgit