diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2008-04-21 16:16:38 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2008-04-21 16:16:38 +0000 |
commit | 184f752e22d9b8e84c013568777cf12290641b7a (patch) | |
tree | c2bf73be0347f73c80bfc4a4cbd2301508fc73b4 /extensions | |
parent | bc89908e2c110cd3c72bbf3797f80788f668814c (diff) | |
download | telepathy-salut-184f752e22d9b8e84c013568777cf12290641b7a.tar.gz |
Update code generation machinery
20080421161638-53eee-78f691d4d0d0c0963127d77bae015e548efe831f.gz
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/Makefile.am | 123 | ||||
-rw-r--r-- | extensions/all.xml | 5 | ||||
-rw-r--r-- | extensions/channel.xml | 27 | ||||
-rw-r--r-- | extensions/connection.xml | 28 | ||||
-rw-r--r-- | extensions/extensions.c | 6 |
5 files changed, 131 insertions, 58 deletions
diff --git a/extensions/Makefile.am b/extensions/Makefile.am index 4cf36f1d..9e746711 100644 --- a/extensions/Makefile.am +++ b/extensions/Makefile.am @@ -4,13 +4,13 @@ tools_dir = $(srcdir)/tools include _gen/spec-gen.am -EXTRA_DIST = $(SPEC_INTERFACE_XMLS) all.xml - -SPEC_GENERATED_SOURCES = \ - $(SPEC_GENERATED_CS) \ - $(SPEC_GENERATED_HS) \ - $(SPEC_GENERATED_LISTS) \ - $(SPEC_GLUE_HS) +EXTRA_DIST = \ + Channel_Type_File_Transfer.xml \ + channel.xml \ + OLPC_Buddy_Info.xml \ + OLPC_Activity_Properties.xml \ + connection.xml \ + all.xml noinst_LTLIBRARIES = libsalut-extensions.la @@ -23,73 +23,86 @@ nodist_libsalut_extensions_la_SOURCES = \ _gen/signals-marshal.list \ _gen/enums.h \ _gen/interfaces.h \ + _gen/interfaces-body.h \ _gen/svc.h \ - $(SPEC_GENERATED_SOURCES) + _gen/svc.c -BUILT_SOURCES = $(nodist_libsalut_extensions_la_SOURCES) extensions.html +BUILT_SOURCES = \ + _gen/all.xml \ + _gen/channel.xml \ + _gen/connection.xml \ + $(nodist_libsalut_extensions_la_SOURCES) \ + extensions.html CLEANFILES = $(BUILT_SOURCES) _gen/.exists -AM_CFLAGS = $(ERROR_CFLAGS) $(GCOV_CFLAGS) @DBUS_CFLAGS@ @GLIB_CFLAGS@ @TELEPATHY_GLIB_CFLAGS@ +AM_CFLAGS = \ + $(ERROR_CFLAGS) \ + $(GCOV_CFLAGS) \ + $(DBUS_CFLAGS) \ + $(GLIB_CFLAGS) \ + $(TELEPATHY_GLIB_CFLAGS) + AM_LDFLAGS = $(GCOV_LIBS) @DBUS_LIBS@ @GLIB_LIBS@ @TELEPATHY_GLIB_LIBS@ -# Generated stuff +# Generated files which can be generated for all categories simultaneously -DROP_NAMESPACE = sed -e 's@xmlns:tp="http://telepathy\.freedesktop\.org/wiki/DbusSpec.extensions-v0"@@g' XSLTPROCFLAGS = --nonet --novalid -_gen/.exists: - $(INSTALL) -d _gen - touch $@ +_gen/%.xml: %.xml $(wildcard *.xml) $(tools_dir)/identity.xsl + $(mkdir_p) _gen + $(XSLTPROC) $(XSLTPROCFLAGS) --xinclude $(tools_dir)/identity.xsl \ + $< > $@ -extensions.html: all.xml $(SPEC_INTERFACE_XMLS) $(tools_dir)/doc-generator.xsl +extensions.html: _gen/all.xml $(tools_dir)/doc-generator.xsl $(XSLTPROC) $(XSLTPROCFLAGS) --xinclude \ $(tools_dir)/doc-generator.xsl \ - $(srcdir)/all.xml > $@ - -_gen/%.xml: %.xml $(tools_dir)/spec-to-introspect.xsl _gen/.exists - $(XSLTPROC) $(XSLTPROCFLAGS) \ - $(tools_dir)/spec-to-introspect.xsl $< \ - | $(DROP_NAMESPACE) > $@ - -_gen/async-%.xml: _gen/%.xml $(tools_dir)/make-all-async.xsl - $(XSLTPROC) $(XSLTPROCFLAGS) $(tools_dir)/make-all-async.xsl $< > $@ - -_gen/svc-%-glue.h: _gen/async-%.xml - $(DBUS_BINDING_TOOL) --mode=glib-server --output=$@ \ - --prefix=salut_svc_`echo $* | tr A-Z a-z` $< - -_gen/svc-%.c _gen/svc-%.h _gen/svc-%-signals-marshal.list: %.xml $(tools_dir)/genginterface.py _gen/.exists - $(PYTHON) $(tools_dir)/genginterface.py \ - --filename=_gen/svc-$* --signal-marshal-prefix=_salut_ext \ - --include='<telepathy-glib/dbus.h>' \ - --include='"signals-marshal.h"' \ - --not-implemented-func='tp_dbus_g_method_return_not_implemented' \ - $< SalutSvc`echo $* | tr -d _` + $< > $@ -_gen/signals-marshal.list: $(SPEC_GENERATED_LISTS) - sort $^ /dev/null | uniq > $@ +_gen/signals-marshal.list: _gen/all.xml \ + $(tools_dir)/glib-signals-marshal-gen.py + $(PYTHON) $(tools_dir)/glib-signals-marshal-gen.py $< > $@ -_gen/signals-marshal.h: _gen/signals-marshal.list +_gen/signals-marshal.h: _gen/signals-marshal.list Makefile.am $(GLIB_GENMARSHAL) --header --prefix=_salut_ext_marshal $< > $@ -_gen/signals-marshal.c: _gen/signals-marshal.list - $(GLIB_GENMARSHAL) --body --prefix=_salut_ext_marshal $< > $@ +_gen/signals-marshal.c: _gen/signals-marshal.list Makefile.am + { echo '#include "_gen/signals-marshal.h"' && \ + $(GLIB_GENMARSHAL) --body --prefix=_salut_ext_marshal $< ; } > $@ -_gen/svc.h: Makefile.in _gen/.exists - for i in $(SPEC_INTERFACES); \ - do \ - echo "#include \"extensions/_gen/svc-$$i.h\""; \ - done > $@ +_gen/register-dbus-glib-marshallers-body.h: _gen/all.xml \ + $(tools_dir)/glib-client-marshaller-gen.py + $(PYTHON) $(tools_dir)/glib-client-marshaller-gen.py $< \ + _salut_ext > $@ -_gen/enums.h: all.xml tools/c-constants-generator.xsl _gen/.exists - $(XSLTPROC) --xinclude $(XSLTPROCFLAGS) \ +_gen/enums.h: _gen/all.xml $(tools_dir)/c-constants-generator.xsl + $(XSLTPROC) $(XSLTPROCFLAGS) \ + --stringparam mixed-case-prefix Salut \ + $(tools_dir)/c-constants-generator.xsl \ + $< > $@ + +_gen/interfaces.h: _gen/all.xml \ + $(tools_dir)/glib-interfaces-generator.xsl \ + $(tools_dir)/c-interfaces-generator.xsl + $(XSLTPROC) $(XSLTPROCFLAGS) \ --stringparam mixed-case-prefix Salut \ - $(srcdir)/tools/c-constants-generator.xsl \ - $(srcdir)/all.xml > $@ + $(tools_dir)/glib-interfaces-generator.xsl \ + $< > $@ -_gen/interfaces.h: all.xml tools/c-interfaces-generator.xsl _gen/.exists - $(XSLTPROC) --xinclude $(XSLTPROCFLAGS) \ +_gen/interfaces-body.h: _gen/all.xml \ + $(tools_dir)/glib-interfaces-body-generator.xsl \ + $(tools_dir)/c-interfaces-generator.xsl + $(XSLTPROC) $(XSLTPROCFLAGS) \ --stringparam mixed-case-prefix Salut \ - $(srcdir)/tools/c-interfaces-generator.xsl \ - $(srcdir)/all.xml > $@ + $(tools_dir)/glib-interfaces-body-generator.xsl \ + $< > $@ + +_gen/svc.c _gen/svc.h: _gen/all.xml $(tools_dir)/glib-ginterface-gen.py + $(PYTHON) $(tools_dir)/glib-ginterface-gen.py \ + --filename=_gen/svc \ + --signal-marshal-prefix=_salut_ext \ + --include='<telepathy-glib/dbus.h>' \ + --include='"_gen/signals-marshal.h"' \ + --not-implemented-func='tp_dbus_g_method_return_not_implemented' \ + --allow-unstable \ + $< Salut_Svc_ diff --git a/extensions/all.xml b/extensions/all.xml index b5a14553..193405ce 100644 --- a/extensions/all.xml +++ b/extensions/all.xml @@ -22,8 +22,7 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA</p> </tp:license> -<xi:include href="Channel_Type_File_Transfer.xml"/> -<xi:include href="OLPC_Buddy_Info.xml"/> -<xi:include href="OLPC_Activity_Properties.xml"/> +<xi:include href="channel.xml"/> +<xi:include href="connection.xml"/> </tp:spec> diff --git a/extensions/channel.xml b/extensions/channel.xml new file mode 100644 index 00000000..a82b1422 --- /dev/null +++ b/extensions/channel.xml @@ -0,0 +1,27 @@ +<tp:spec + xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" + xmlns:xi="http://www.w3.org/2001/XInclude"> + +<tp:title>Salut-specific extensions to Channel interfaces</tp:title> + +<tp:copyright>Copyright (C) 2007 Collabora Limited</tp:copyright> + +<tp:license xmlns="http://www.w3.org/1999/xhtml"> +<p>This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version.</p> + +<p>This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details.</p> + +<p>You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA</p> +</tp:license> + +<xi:include href="Channel_Type_File_Transfer.xml"/> + +</tp:spec> diff --git a/extensions/connection.xml b/extensions/connection.xml new file mode 100644 index 00000000..8e72821c --- /dev/null +++ b/extensions/connection.xml @@ -0,0 +1,28 @@ +<tp:spec + xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" + xmlns:xi="http://www.w3.org/2001/XInclude"> + +<tp:title>Salut-specific extensions to Connection interfaces</tp:title> + +<tp:copyright>Copyright (C) 2007 Collabora Limited</tp:copyright> + +<tp:license xmlns="http://www.w3.org/1999/xhtml"> +<p>This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version.</p> + +<p>This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details.</p> + +<p>You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA</p> +</tp:license> + +<xi:include href="OLPC_Buddy_Info.xml"/> +<xi:include href="OLPC_Activity_Properties.xml"/> + +</tp:spec> diff --git a/extensions/extensions.c b/extensions/extensions.c new file mode 100644 index 00000000..eeda4623 --- /dev/null +++ b/extensions/extensions.c @@ -0,0 +1,6 @@ +#include "extensions.h" + +/* include auto-generated stubs for things common to service and client */ +#include "_gen/gtypes-body.h" +#include "_gen/interfaces-body.h" +#include "_gen/signals-marshal.h" |