From 050bf4a893e24061c3de35eb24c05d3d1002ed28 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 6 Aug 2007 14:26:21 +0100 Subject: [PATCH] Makefile.am, test/Makefile.am: Use @abs_top_builddir@, @abs_top_srcdir@ This fixes incorrect Python path for docs and tests if doing an out-of-tree build using an absolute path for $(srcdir), and is also less ugly. --- Makefile.am | 6 ++++-- test/Makefile.am | 10 ++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index 2e00f70..56e19d9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,6 @@ +abs_top_srcdir = @abs_top_srcdir@ +abs_top_builddir = @abs_top_builddir@ + ACLOCAL_AMFLAGS = -I m4 # the api, doc, include subdirs don't need their own Makefile.am @@ -80,8 +83,7 @@ _dbus_bindings/_dbus_bindings.la: _dbus_glib_bindings/_dbus_glib_bindings.la: $(MAKE) -C _dbus_glib_bindings -PWD = `pwd` -APIDOC_PYTHONPATH = $(PWD)/$(top_srcdir):$(PWD)/_dbus_bindings/.libs:$(PWD)/_dbus_glib_bindings/.libs +APIDOC_PYTHONPATH = $(abs_top_srcdir):$(abs_top_builddir)/_dbus_bindings/.libs:$(abs_top_builddir)/_dbus_glib_bindings/.libs api api/index.html: $(python_PYTHON) dbus/.doc-needs-rebuild-stamp \ _dbus_bindings/_dbus_bindings.la \ diff --git a/test/Makefile.am b/test/Makefile.am index ef2d529..a40c3d1 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,3 +1,6 @@ +abs_top_srcdir = @abs_top_srcdir@ +abs_top_builddir = @abs_top_builddir@ + EXTRA_DIST = \ cross-test-client.py \ cross-test-server.py \ @@ -28,11 +31,10 @@ dbus_py_test_la_LDFLAGS = -module -avoid-version \ dbus_py_test_la_SOURCES = dbus_py_test.c \ $(top_srcdir)/include/dbus-python.h -PWD = `pwd` -TESTS_ENVIRONMENT = DBUS_TOP_SRCDIR="$(PWD)/$(top_srcdir)" \ - DBUS_TOP_BUILDDIR="$(PWD)/$(top_builddir)" \ +TESTS_ENVIRONMENT = DBUS_TOP_SRCDIR="$(abs_top_srcdir)" \ + DBUS_TOP_BUILDDIR="$(abs_top_builddir)" \ DBUS_PYTHON_VERSION='$(PACKAGE_VERSION)' \ - PYTHONPATH="$(PWD)/.libs:$(PWD)/$(top_srcdir):$(PWD)/$(top_srcdir)/test:$(PWD)/../_dbus_bindings/.libs:$(PWD)/../_dbus_glib_bindings/.libs" \ + PYTHONPATH="$(abs_top_builddir)/test/.libs:$(abs_top_srcdir):$(abs_top_srcdir)/test:$(abs_top_builddir)/_dbus_bindings/.libs:$(abs_top_builddir)/_dbus_glib_bindings/.libs" \ PYTHON='$(PYTHON)' TESTS = run-test.sh -- 2.11.4.GIT