diff options
author | Zeeshan Ali (Khattak) <zeeshanak@gnome.org> | 2015-10-09 15:25:24 +0100 |
---|---|---|
committer | Zeeshan Ali (Khattak) <zeeshanak@gnome.org> | 2015-10-09 15:26:59 +0100 |
commit | ab946474998d763c0329d84e3d1e2c9b03b8e835 (patch) | |
tree | fedf99e9e6fd46a0f03bd90943cc46b80b6df3cd | |
parent | 2bf812b3a4ec76e32d49e47e2158aad186b55c8c (diff) | |
download | geoclue-ab946474998d763c0329d84e3d1e2c9b03b8e835.tar.gz |
Generate separate code file for each interface
Without this change, build looks for two of the interface files in build
directory, rather than source directory and build fails if srcdir !=
builddir.
-rw-r--r-- | src/Makefile.am | 49 | ||||
-rw-r--r-- | src/gclue-service-client.h | 2 | ||||
-rw-r--r-- | src/gclue-service-location.h | 2 | ||||
-rw-r--r-- | src/gclue-service-manager.h | 2 |
4 files changed, 41 insertions, 14 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 968b6b5..3ffd7e1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,25 +4,52 @@ libexec_PROGRAMS = geoclue SUBDIRS = public-api agent geocode-glib -interfacedir = $(datadir)/dbus-1/interfaces -interface_DATA = org.freedesktop.GeoClue2.Client.xml \ - org.freedesktop.GeoClue2.Location.xml \ - org.freedesktop.GeoClue2.Manager.xml +CLIENT_INTERFACE_XML = org.freedesktop.GeoClue2.Client.xml +LOCATION_INTERFACE_XML = org.freedesktop.GeoClue2.Location.xml +MANAGER_INTERFACE_XML = org.freedesktop.GeoClue2.Manager.xml -dbus_built_sources = geoclue-interface.c \ - geoclue-interface.h \ +interfacedir = $(datadir)/dbus-1/interfaces +interface_DATA = $(CLIENT_INTERFACE_XML) \ + $(LOCATION_INTERFACE_XML) \ + $(MANAGER_INTERFACE_XML) + +dbus_built_sources = gclue-client-interface.c \ + gclue-client-interface.h \ + gclue-location-interface.c \ + gclue-location-interface.h \ + gclue-manager-interface.c \ + gclue-manager-interface.h \ compass-interface.c \ compass-interface.h \ wpa_supplicant-interface.c \ wpa_supplicant-interface.h -geoclue-interface.c: geoclue-interface.h -geoclue-interface.h: Makefile.am $(interface_DATA) + +gclue-client-interface.c: gclue-client-interface.h +gclue-client-interface.h: Makefile.am $(CLIENT_INTERFACE_XML) + $(AM_V_GEN)$(GDBUS_CODEGEN) \ + --interface-prefix org.freedesktop.GeoClue2. \ + --c-namespace GClueDBus \ + --generate-c-code gclue-client-interface \ + --generate-docbook=docs \ + $(srcdir)/$(CLIENT_INTERFACE_XML) + +gclue-location-interface.c: gclue-location-interface.h +gclue-location-interface.h: Makefile.am $(LOCATION_INTERFACE_XML) + $(AM_V_GEN)$(GDBUS_CODEGEN) \ + --interface-prefix org.freedesktop.GeoClue2. \ + --c-namespace GClueDBus \ + --generate-c-code gclue-location-interface \ + --generate-docbook=docs \ + $(srcdir)/$(LOCATION_INTERFACE_XML) + +gclue-manager-interface.c: gclue-manager-interface.h +gclue-manager-interface.h: Makefile.am $(MANAGER_INTERFACE_XML) $(AM_V_GEN)$(GDBUS_CODEGEN) \ --interface-prefix org.freedesktop.GeoClue2. \ --c-namespace GClueDBus \ - --generate-c-code geoclue-interface \ - --generate-docbook=docs \ - $(srcdir)/$(interface_DATA) + --generate-c-code gclue-manager-interface \ + --generate-docbook=docs \ + $(srcdir)/$(MANAGER_INTERFACE_XML) wpa_supplicant-interface.c: wpa_supplicant-interface.h wpa_supplicant-interface.h: Makefile.am fi.w1.wpa_supplicant1.xml diff --git a/src/gclue-service-client.h b/src/gclue-service-client.h index 758aa90..df3069b 100644 --- a/src/gclue-service-client.h +++ b/src/gclue-service-client.h @@ -24,7 +24,7 @@ #define GCLUE_SERVICE_CLIENT_H #include <glib-object.h> -#include "geoclue-interface.h" +#include "gclue-client-interface.h" #include "geoclue-agent-interface.h" #include "gclue-client-info.h" diff --git a/src/gclue-service-location.h b/src/gclue-service-location.h index eeb1f7d..8a904d7 100644 --- a/src/gclue-service-location.h +++ b/src/gclue-service-location.h @@ -26,7 +26,7 @@ #include <glib-object.h> #include "gclue-location.h" #include "gclue-client-info.h" -#include "geoclue-interface.h" +#include "gclue-location-interface.h" G_BEGIN_DECLS diff --git a/src/gclue-service-manager.h b/src/gclue-service-manager.h index aab7073..c09d0a1 100644 --- a/src/gclue-service-manager.h +++ b/src/gclue-service-manager.h @@ -24,7 +24,7 @@ #define GCLUE_SERVICE_MANAGER_H #include <glib-object.h> -#include "geoclue-interface.h" +#include "gclue-manager-interface.h" G_BEGIN_DECLS |