1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
BUILT_SOURCES = \
gabble-media-session-enumtypes.h \
gabble-media-session-enumtypes.c \
gabble-signals-marshal.h \
gabble-signals-marshal.c
CLEANFILES = $(BUILT_SOURCES)
bin_PROGRAMS=telepathy-gabble
noinst_PROGRAMS = write-mgr-file
# These are the bits we wrote, so we can be really strict about coding style
libgabble_convenience_la_our_sources = \
base64.h \
base64.c \
capabilities.h \
capabilities.c \
conn-aliasing.h \
conn-aliasing.c \
conn-avatars.h \
conn-avatars.c \
conn-presence.h \
conn-presence.c \
debug.h \
debug.c \
disco.h \
disco.c \
gabble-error.c \
gabble-error.h \
gabble-connection-manager.h \
gabble-connection-manager.c \
gabble-connection.h \
gabble-connection.c \
gabble-im-channel.h \
gabble-im-channel.c \
gabble-muc-channel.h \
gabble-muc-channel.c \
gabble-media-channel.h \
gabble-media-channel.c \
gabble-media-session.h \
gabble-media-session.c \
gabble-media-stream.h \
gabble-media-stream.c \
gabble-register.c \
gabble-register.h \
gabble-roster-channel.h \
gabble-roster-channel.c \
gabble-roomlist-channel.h \
gabble-roomlist-channel.c \
gabble-types.h \
handles.h \
handles.c \
im-factory.h \
im-factory.c \
media-factory.h \
media-factory.c \
muc-factory.h \
muc-factory.c \
namespaces.h \
presence.h \
presence.c \
presence-cache.h \
presence-cache.c \
roster.h \
roster.c \
text-mixin.h \
text-mixin.c \
util.h \
util.c \
vcard-manager.h \
vcard-manager.c \
gabble-signals-marshal.list
# we don't want to subject third-party source to whitespace removal -
# it's more useful to keep it a verbatim copy
libgabble_convenience_la_SOURCES = \
libmd5-rfc/md5.c \
libmd5-rfc/md5.h \
sha1/sha1.h \
sha1/sha1.c \
$(libgabble_convenience_la_our_sources)
nodist_libgabble_convenience_la_SOURCES = \
$(BUILT_SOURCES)
write_mgr_file_SOURCES = write-mgr-file.c
write_mgr_file_LDADD = libgabble-convenience.la \
$(top_builddir)/lib/telepathy-glib/libtelepathy-glib.la
telepathy_gabble_SOURCES = \
gabble.h \
gabble.c
whitespace_sources = \
$(telepathy_gabble_SOURCES) \
$(libgabble_convenience_la_our_sources) \
$(telepathy_gabble_SOURCES) \
$(write_mgr_file_SOURCES)
check-local::
@echo "Checking whitespace-related trivia..."
@if grep -n ' $$' $(whitespace_sources); \
then \
echo "^^^ The above files contain unwanted trailing spaces"; \
exit 1; \
fi
@if grep -n ' ' $(whitespace_sources); \
then \
echo "^^^ The above files contain tabs"; \
exit 1; \
fi
@echo "Checking for GError mistakes..."
@if grep -n '^ *GError *\*[a-zA-Z_][a-zA-Z0-9_]* *;' \
$(whitespace_sources); \
then \
echo "^^^ The above files contain uninitialized GError*s -"; \
echo " they should be initialized to NULL"; \
exit 1; \
fi
telepathy_gabble_LDADD = libgabble-convenience.la \
$(top_builddir)/lib/telepathy-glib/libtelepathy-glib.la
noinst_LTLIBRARIES = libgabble-convenience.la
AM_CFLAGS = $(ERROR_CFLAGS) -I$(top_srcdir)/lib -I$(top_builddir)/lib \
@DBUS_CFLAGS@ @GLIB_CFLAGS@ @LOUDMOUTH_CFLAGS@ \
@HANDLE_LEAK_DEBUG_CFLAGS@ @COVERAGE_CFLAGS@
AM_LDFLAGS = @DBUS_LIBS@ @GLIB_LIBS@ @LOUDMOUTH_LIBS@
%-signals-marshal.h: %-signals-marshal.list
glib-genmarshal --header --prefix=$(subst -,_,$*)_marshal $< > $*-signals-marshal.h
%-signals-marshal.c: %-signals-marshal.list
glib-genmarshal --body --prefix=$(subst -,_,$*)_marshal $< > $*-signals-marshal.c
%-marshal.h: %-marshal.list
glib-genmarshal --header --prefix=$(subst -,_,$*)_marshal $< > $*-marshal.h
%-marshal.c: %-marshal.list
glib-genmarshal --body --prefix=$(subst -,_,$*)_marshal $< > $*-marshal.c
# rules for making the glib enum objects
%-enumtypes.h: %.h Makefile.in
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@_get_type (void);\n#define $(shell echo $* | tr [:lower:]- [:upper:]_ | sed 's/_.*//')_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
--ftail "G_END_DECLS\n\n#endif /* __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__ */" \
$< > $@
%-enumtypes.c: %.h Makefile.in
glib-mkenums \
--fhead "#include <$*.h>\n#include <$*-enumtypes.h>" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@VALUENAME@\" }," \
--vtail " { 0, NULL, NULL }\n };\n etype = g_@type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" \
$< > $@
|