[glib] gdbus codegen: Ensure PYTHONPATH is set correctly for srcdir != builddir



commit 62072b2a043ab872e45c89b6f7f9073cd7035bf5
Author: Colin Walters <walters verbum org>
Date:   Mon Jun 6 17:14:45 2011 -0400

    gdbus codegen: Ensure PYTHONPATH is set correctly for srcdir != builddir
    
    We need to pick up the Python files from the source directory, so set
    PYTHONPATH.

 gio/tests/Makefile.am                              |    2 +-
 gio/tests/gdbus-object-manager-example/Makefile.am |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
index bc2ca18..07530dc 100644
--- a/gio/tests/Makefile.am
+++ b/gio/tests/Makefile.am
@@ -245,7 +245,7 @@ gdbus_bz627724_SOURCES = gdbus-bz627724.c gdbus-sessionbus.c gdbus-sessionbus.h
 gdbus_bz627724_LDADD = $(progs_ldadd)
 
 gdbus-test-codegen-generated.h gdbus-test-codegen-generated.c : test-codegen.xml
-	$(AM_V_GEN) $(PYTHON) $(top_srcdir)/gio/gdbus-codegen/codegen_main.py	 				\
+	$(AM_V_GEN) PYTHONPATH=$(top_srcdir)/gio/gdbus-codegen$${PYTHONPATH:+:$$PYTHONPATH} $(top_builddir)/gio/gdbus-codegen/gdbus-codegen	 	\
 		--interface-prefix org.project.								\
 		--generate-c-code gdbus-test-codegen-generated						\
 		--c-generate-object-manager								\
diff --git a/gio/tests/gdbus-object-manager-example/Makefile.am b/gio/tests/gdbus-object-manager-example/Makefile.am
index 0eb73b5..8f4cda3 100644
--- a/gio/tests/gdbus-object-manager-example/Makefile.am
+++ b/gio/tests/gdbus-object-manager-example/Makefile.am
@@ -22,7 +22,7 @@ GDBUS_GENERATED = 										\
 	$(NULL)
 
 $(GDBUS_GENERATED) : gdbus-example-objectmanager.xml
-	$(AM_V_GEN) $(PYTHON) $(top_srcdir)/gio/gdbus-codegen/codegen_main.py	 	\
+	$(AM_V_GEN) PYTHONPATH=$(top_srcdir)/gio/gdbus-codegen$${PYTHONPATH:+:$$PYTHONPATH} $(top_builddir)/gio/gdbus-codegen/gdbus-codegen	 	\
 		--interface-prefix org.gtk.GDBus.Example.ObjectManager.		\
 		--c-namespace Example 						\
 		--c-generate-object-manager					\



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]