[evolution-data-server/murrayc-with-glib-gdbus-codegen: 3/3] Use AC_PATH_PROG() to get the path to gdbus-codegen



commit 765904ed5daa768d220bacd343ae57650c4ed274
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Jun 17 14:54:23 2011 +0200

    Use AC_PATH_PROG() to get the path to gdbus-codegen
    
    However. This still isn't quite enough, because the standalone one
    has different command-line options, and the generated API is
    very different, so the client code would need to be changed too.

 addressbook/libegdbus/Makefile.am |    2 +-
 calendar/libegdbus/Makefile.am    |    2 +-
 configure.ac                      |    4 ++++
 mail/libegdbus/Makefile.am        |   13 ++++++++-----
 4 files changed, 14 insertions(+), 7 deletions(-)
---
diff --git a/addressbook/libegdbus/Makefile.am b/addressbook/libegdbus/Makefile.am
index 8610649..cd07797 100644
--- a/addressbook/libegdbus/Makefile.am
+++ b/addressbook/libegdbus/Makefile.am
@@ -4,7 +4,7 @@ GDBUS_XML_FILES =					\
 	../libedata-book/e-data-book.xml
 
 gdbus-files: $(GDBUS_XML_FILES)
-	gdbus-codegen --namespace=EGdbus --strip-prefix=org.gnome.evolution.dataserver.addressbook --output-prefix=e-gdbus $(GDBUS_XML_FILES)
+	$(GDBUS_CODEGEN) --namespace=EGdbus --strip-prefix=org.gnome.evolution.dataserver.addressbook --output-prefix=e-gdbus $(GDBUS_XML_FILES)
 	rm e-gdbus-bindings.h
 	rm e-gdbus-bindings.stamp
 
diff --git a/calendar/libegdbus/Makefile.am b/calendar/libegdbus/Makefile.am
index b314368..85d5701 100644
--- a/calendar/libegdbus/Makefile.am
+++ b/calendar/libegdbus/Makefile.am
@@ -4,7 +4,7 @@ GDBUS_XML_FILES =				\
 	../libedata-cal/e-data-cal.xml
 
 gdbus-files: $(GDBUS_XML_FILES)
-	gdbus-codegen --namespace=EGdbus --strip-prefix=org.gnome.evolution.dataserver.calendar --output-prefix=e-gdbus $(GDBUS_XML_FILES)
+	$(GDBUS_CODEGEN) --namespace=EGdbus --strip-prefix=org.gnome.evolution.dataserver.calendar --output-prefix=e-gdbus $(GDBUS_XML_FILES)
 	rm e-gdbus-bindings.h
 	rm e-gdbus-bindings.stamp
 
diff --git a/configure.ac b/configure.ac
index f7538c0..2821b89 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1241,6 +1241,10 @@ PKG_CHECK_MODULES([GIO_WITH_GDBUS_CODEGEN], [gio-2.0 >= 2.29.3],
   AC_DEFINE([HAVE_STANDALONE_GDBUS_CODEGEN], 1, [Whether we are using the standalone gdbus-codgen instead of the one in gio >= 2.29.3])
 )
 
+# Get the path to gdbus-codegen
+# (This could be from glib or from the standalone gdbus-codegen)
+AC_PATH_PROG(GDBUS_CODEGEN, gdbus-codegen, [no])
+
 PKG_CHECK_MODULES(FFI, libffi)
 
 AC_SUBST(FFI_CFLAGS)
diff --git a/mail/libegdbus/Makefile.am b/mail/libegdbus/Makefile.am
index 5b53d5a..9f7e4d1 100644
--- a/mail/libegdbus/Makefile.am
+++ b/mail/libegdbus/Makefile.am
@@ -1,14 +1,17 @@
 GDBUS_XML_FILES =					\
 	../daemon/e-mail-data-session.xml	\
-	../deamon/e-mail-data-store.xml		\
+	../daemon/e-mail-data-store.xml	\
 	../daemon/e-mail-data-folder.xml
 
+# TODO: This won't work because it doesn't get the generated filename properly. murrayc.
 gdbus-files: $(GDBUS_XML_FILES)
-	~/opt/master/bin/gdbus-codegen --namespace=EGdbus --strip-prefix=org.gnome.evolution.dataserver.mail --generate-c-code=$^ $^.xml
+# $(GDBUS_CODEGEN) --namespace=EGdbus --strip-prefix=org.gnome.evolution.dataserver.mail --generate-c-code=$^ $^.xml
+	$(GDBUS_CODEGEN) --c-namespace=EGdbus --interface-prefix=org.gnome.evolution.dataserver.mail --generate-c-code=$^ $^.xml	
 
-#~/opt/master/bin/gdbus-codegen --namespace=EGdbusSession --strip-prefix=org.gnome.evolution.dataserver.mail. --generate-c-code=e-gdbus-emailsession ../src/e-mail-data-session.xml
-#~/opt/master/bin/gdbus-codegen --namespace=EGdbusFolder --strip-prefix=org.gnome.evolution.dataserver.mail. --generate-c-code=e-gdbus-emailfolder ../src/e-mail-data-folder.xml 
-#~/opt/master/bin/gdbus-codegen --namespace=EGdbusStore --strip-prefix=org.gnome.evolution.dataserver.mail. --generate-c-code=e-gdbus-emailstore ../src/e-mail-data-store.xml
+
+# $(GDBUS_CODEGEN) --c-namespace=EGdbusSession --interface-prefix=org.gnome.evolution.dataserver.mail. --generate-c-code=e-gdbus-emailsession ../daemon/e-mail-data-session.xml
+# $(GDBUS_CODEGEN) --c-namespace=EGdbusFolder --interface-prefix=org.gnome.evolution.dataserver.mail. --generate-c-code=e-gdbus-emailfolder ../daemon/e-mail-data-folder.xml 
+# $(GDBUS_CODEGEN) --c-namespace=EGdbusStore --interface-prefix=org.gnome.evolution.dataserver.mail. --generate-c-code=e-gdbus-emailstore ../daemon/e-mail-data-store.xml
 
 # The library
 noinst_LTLIBRARIES = libegdbus-mail.la



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