[telepathy-gabble/master] add skeleton of loudmouth-wocky compatibility layer
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Fri Sep 11 07:56:08 PDT 2009
---
lib/loudmouth/Makefile.am | 67 +++++++++++++++++++++++++++++++++++++++++++++
lib/loudmouth/loudmouth.h | 28 +++++++++++++++++++
2 files changed, 95 insertions(+), 0 deletions(-)
create mode 100644 lib/loudmouth/Makefile.am
create mode 100644 lib/loudmouth/loudmouth.h
diff --git a/lib/loudmouth/Makefile.am b/lib/loudmouth/Makefile.am
new file mode 100644
index 0000000..1831cf5
--- /dev/null
+++ b/lib/loudmouth/Makefile.am
@@ -0,0 +1,67 @@
+include $(top_srcdir)/tools/shave.mk
+
+noinst_LTLIBRARIES = libloudmouth.la
+
+BUILT_SOURCES = \
+ loudmouth-signals-marshal.list \
+ loudmouth-signals-marshal.h \
+ loudmouth-signals-marshal.c
+
+OUR_SOURCES = \
+ loudmouth.h
+
+libloudmouth_la_SOURCES = $(OUR_SOURCES) $(BUILT_SOURCES)
+
+# Coding style checks
+check_c_sources = \
+ $(OUR_SOURCES)
+
+include $(top_srcdir)/tools/check-coding-style.mk
+check-local: check-coding-style
+
+CLEANFILES=$(BUILT_SOURCES)
+dist-hook:
+ $(shell for x in $(BUILT_SOURCES); do rm -f $(distdir)/$$x ; done)
+
+loudmouth-signals-marshal.list: $(OUR_SOURCES) Makefile.am
+ $(QUIET_GEN)( cd $(srcdir) && \
+ sed -n -e 's/.*_loudmouth_signals_marshal_\([[:upper:][:digit:]]*__[[:upper:][:digit:]_]*\).*/\1/p' \
+ $(OUR_SOURCES) ) \
+ | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
+ if cmp -s $@.tmp $@; then \
+ rm $@.tmp; \
+ touch $@; \
+ else \
+ mv $@.tmp $@; \
+ fi
+
+%-signals-marshal.h: %-signals-marshal.list Makefile.am
+ $(QUIET_GEN)glib-genmarshal --header --prefix=_$(subst -,_,$*)_signals_marshal $< > $@
+
+%-signals-marshal.c: %-signals-marshal.list Makefile.am
+ $(QUIET_GEN){ echo '#include "$*-signals-marshal.h"' && \
+ glib-genmarshal --body --prefix=_$(subst -,_,$*)_signals_marshal $< ; \
+ } > $@
+
+
+AM_CFLAGS = $(ERROR_CFLAGS) $(GCOV_CFLAGS) @GLIB_CFLAGS@ @WOCKY_CFLAGS@
+
+AM_LDFLAGS = $(GCOV_LIBS) @GLIB_LIBS@ @RESOLV_LIBS@ @WOCKY_LIBS@
+
+# rules for making the glib enum objects
+%-enumtypes.h: %.h Makefile.in
+ $(QUIET_GEN)glib-mkenums \
+ --fhead "#ifndef __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__\n#define __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
+ --fprod "/* enumerations from \"@filename@\" */\n" \
+ --vhead "GType @enum_name at _get_type (void);\n#define $(shell echo $* | tr [:lower:]- [:upper:]_ | sed 's/_.*//')_TYPE_ at ENUMSHORT@ (@enum_name at _get_type())\n" \
+ --ftail "G_END_DECLS\n\n#endif /* __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__ */" \
+ $< > $@
+
+%-enumtypes.c: %.h Makefile.in
+ $(QUIET_GEN)glib-mkenums \
+ --fhead "#include <$*.h>\n#include <$*-enumtypes.h>" \
+ --fprod "\n/* enumerations from \"@filename@\" */" \
+ --vhead "GType\n at enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G at Type@Value values[] = {" \
+ --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@VALUENAME@\" }," \
+ --vtail " { 0, NULL, NULL }\n };\n etype = g_ at type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \
+ $< > $@
diff --git a/lib/loudmouth/loudmouth.h b/lib/loudmouth/loudmouth.h
new file mode 100644
index 0000000..6bdce74
--- /dev/null
+++ b/lib/loudmouth/loudmouth.h
@@ -0,0 +1,28 @@
+/*
+ * loudmouth.h - Loudmouth-Wocky compatibility layer
+ * Copyright (C) 2009 Collabora Ltd.
+ * @author Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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
+ */
+
+#ifndef __LOUDMOUTH_H__
+#define __LOUDMOUTH_H__
+
+G_BEGIN_DECLS
+
+G_END_DECLS
+
+#endif /* #ifndef __LOUDMOUTH_H__ */
--
1.5.6.5
More information about the telepathy-commits
mailing list