telepathy-glib: Do not include single headers in codegen
Xavier Claessens
xclaesse at kemper.freedesktop.org
Mon Sep 10 08:43:24 PDT 2012
Module: telepathy-glib
Branch: master
Commit: 29daab56223b7a2bb8c98e389aca85a2b8a0dcfb
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=29daab56223b7a2bb8c98e389aca85a2b8a0dcfb
Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date: Mon Sep 10 17:03:25 2012 +0200
Do not include single headers in codegen
Headers to use is caller's choice, like that tp-glib internal can use
single headers while extensions can use global header.
This also move command line headers to generated .h instead of .c
---
telepathy-glib/codegen.am | 1 +
tests/dbus/Makefile.am | 1 +
tools/glib-ginterface-gen.py | 8 +++-----
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/telepathy-glib/codegen.am b/telepathy-glib/codegen.am
index 6ad3ec5..8bc0032 100644
--- a/telepathy-glib/codegen.am
+++ b/telepathy-glib/codegen.am
@@ -219,6 +219,7 @@ _gen/tp-svc-%.c: _gen/tp-spec-%.xml \
--filename=_gen/tp-svc-$* \
--signal-marshal-prefix=_tp \
--include='<telepathy-glib/dbus.h>' \
+ --include='<telepathy-glib/dbus-properties-mixin.h>' \
--not-implemented-func='tp_dbus_g_method_return_not_implemented' \
$< Tp_Svc_
diff --git a/tests/dbus/Makefile.am b/tests/dbus/Makefile.am
index 00f6756..1e77043 100644
--- a/tests/dbus/Makefile.am
+++ b/tests/dbus/Makefile.am
@@ -374,6 +374,7 @@ _gen/svc.c: with-properties.xml \
$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/glib-ginterface-gen.py \
--filename=_gen/svc \
--signal-marshal-prefix=NOT_NEEDED \
+ --include='<telepathy-glib/dbus-properties-mixin.h>' \
$< Test_Svc_
_gen/errors-check.h: $(top_srcdir)/spec/errors.xml \
diff --git a/tools/glib-ginterface-gen.py b/tools/glib-ginterface-gen.py
index 7843977..6fec0d3 100644
--- a/tools/glib-ginterface-gen.py
+++ b/tools/glib-ginterface-gen.py
@@ -738,8 +738,9 @@ class Generator(object):
self.h('#include <glib-object.h>')
self.h('#include <dbus/dbus-glib.h>')
- if self.have_properties(nodes):
- self.h('#include <telepathy-glib/dbus-properties-mixin.h>')
+ for header in self.headers:
+ self.h('#include %s' % header)
+ self.h('')
self.h('')
self.h('G_BEGIN_DECLS')
@@ -747,9 +748,6 @@ class Generator(object):
self.b('#include "%s.h"' % self.basename)
self.b('')
- for header in self.headers:
- self.b('#include %s' % header)
- self.b('')
for node in nodes:
self.do_node(node)
More information about the telepathy-commits
mailing list