Add a generic property test
[platform/upstream/glib.git] / gio / tests / Makefile.am
1 include $(top_srcdir)/glib-tap.mk
2
3 dist_uninstalled_test_data =
4 test_ltlibraries =
5
6 SUBDIRS = gdbus-object-manager-example services
7
8 LDADD = \
9         $(top_builddir)/gio/libgio-2.0.la               \
10         $(top_builddir)/gobject/libgobject-2.0.la       \
11         $(top_builddir)/gmodule/libgmodule-2.0.la       \
12         $(top_builddir)/glib/libglib-2.0.la             \
13         $(NULL)
14
15 AM_CPPFLAGS = $(gio_INCLUDES) $(GLIB_DEBUG_FLAGS) -I$(top_builddir)/gio -I$(top_srcdir)/gio
16 DEFS = -DG_LOG_DOMAIN=\"GLib-GIO\" -DTEST_SERVICES=\""$(abs_top_builddir)/gio/tests/services"\"
17 AM_CFLAGS = $(GLIB_WARN_CFLAGS)
18
19 # -----------------------------------------------------------------------------
20 #  Test programs buildable on all platforms
21
22 test_programs = \
23         appmonitor                              \
24         async-close-output-stream               \
25         async-splice-output-stream              \
26         buffered-input-stream                   \
27         buffered-output-stream                  \
28         cancellable                             \
29         contexts                                \
30         converter-stream                        \
31         credentials                             \
32         data-input-stream                       \
33         data-output-stream                      \
34         defaultvalue                            \
35         fileattributematcher                    \
36         filter-streams                          \
37         gsubprocess                             \
38         g-file                                  \
39         g-file-info                             \
40         g-icon                                  \
41         gdbus-addresses                         \
42         gdbus-message                           \
43         inet-address                            \
44         io-stream                               \
45         memory-input-stream                     \
46         memory-output-stream                    \
47         monitor                                 \
48         network-address                         \
49         network-monitor                         \
50         permission                              \
51         pollable                                \
52         proxy-test                              \
53         readwrite                               \
54         simple-async-result                     \
55         simple-proxy                            \
56         sleepy-stream                           \
57         socket                                  \
58         srvtarget                               \
59         task                                    \
60         tls-interaction                         \
61         vfs                                     \
62         volumemonitor                           \
63         $(NULL)
64
65 uninstalled_test_programs = \
66         $(NULL)
67
68 dist_test_data = \
69         contexts.c                              \
70         g-icon.c                                \
71         $(NULL)
72
73 test_data = \
74         test.gresource                          \
75         $(NULL)
76
77 uninstalled_test_extra_programs = \
78         gio-du                                  \
79         echo-server                             \
80         filter-cat                              \
81         gapplication-example-actions            \
82         gapplication-example-cmdline            \
83         gapplication-example-cmdline2           \
84         gapplication-example-cmdline3           \
85         gapplication-example-dbushooks          \
86         gapplication-example-open               \
87         gdbus-example-export                    \
88         gdbus-example-own-name                  \
89         gdbus-example-peer                      \
90         gdbus-example-proxy-subclass            \
91         gdbus-example-server                    \
92         gdbus-example-subtree                   \
93         gdbus-example-watch-name                \
94         gdbus-example-watch-proxy               \
95         gsubprocess-testprog                    \
96         httpd                                   \
97         proxy                                   \
98         resolver                                \
99         send-data                               \
100         socket-server                           \
101         $(NULL)
102
103 test_extra_programs = \
104         gdbus-connection-flush-helper           \
105         gdbus-testserver                        \
106         $(NULL)
107
108 dist_uninstalled_test_data += $(addprefix schema-tests/,$(schema_tests))
109 schema_tests = \
110         array-default-not-in-choices.gschema.xml        \
111         bad-choice.gschema.xml                          \
112         bad-key.gschema.xml                             \
113         bad-key2.gschema.xml                            \
114         bad-key3.gschema.xml                            \
115         bad-key4.gschema.xml                            \
116         bad-type.gschema.xml                            \
117         bare-alias.gschema.xml                          \
118         choice-alias.gschema.xml                        \
119         choice-bad.gschema.xml                          \
120         choice-badtype.gschema.xml                      \
121         choice-invalid-alias.gschema.xml                \
122         choice-missing-value.gschema.xml                \
123         choice-shadowed-alias.gschema.xml               \
124         choice-upside-down.gschema.xml                  \
125         choice.gschema.xml                              \
126         choices-wrong-type.gschema.xml                  \
127         default-in-aliases.gschema.xml                  \
128         default-not-in-choices.gschema.xml              \
129         default-out-of-range.gschema.xml                \
130         empty-key.gschema.xml                           \
131         enum-with-aliases.gschema.xml                   \
132         enum-with-bad-default.gschema.xml               \
133         enum-with-chained-alias.gschema.xml             \
134         enum-with-choice.gschema.xml                    \
135         enum-with-invalid-alias.gschema.xml             \
136         enum-with-repeated-alias.gschema.xml            \
137         enum-with-repeated-nick.gschema.xml             \
138         enum-with-repeated-value.gschema.xml            \
139         enum-with-shadow-alias.gschema.xml              \
140         enum.gschema.xml                                \
141         extend-and-shadow-indirect.gschema.xml          \
142         extend-and-shadow.gschema.xml                   \
143         extend-missing.gschema.xml                      \
144         extend-nonlist.gschema.xml                      \
145         extend-self.gschema.xml                         \
146         extend-wrong-list-indirect.gschema.xml          \
147         extend-wrong-list.gschema.xml                   \
148         extending.gschema.xml                           \
149         flags-aliased-default.gschema.xml               \
150         flags-bad-default.gschema.xml                   \
151         flags-more-than-one-bit.gschema.xml             \
152         flags-with-enum-attr.gschema.xml                \
153         flags-with-enum-tag.gschema.xml                 \
154         from-docs.gschema.xml                           \
155         incomplete-list.gschema.xml                     \
156         inherit-gettext-domain.gschema.xml              \
157         invalid-path.gschema.xml                        \
158         key-in-list-indirect.gschema.xml                \
159         key-in-list.gschema.xml                         \
160         list-of-missing.gschema.xml                     \
161         missing-quotes.gschema.xml                      \
162         no-default.gschema.xml                          \
163         overflow.gschema.xml                            \
164         override-missing.gschema.xml                    \
165         override-range-error.gschema.xml                \
166         override-then-key.gschema.xml                   \
167         override-twice.gschema.xml                      \
168         override-type-error.gschema.xml                 \
169         override.gschema.xml                            \
170         range-badtype.gschema.xml                       \
171         range-default-high.gschema.xml                  \
172         range-default-low.gschema.xml                   \
173         range-high-default.gschema.xml                  \
174         range-low-default.gschema.xml                   \
175         range-missing-max.gschema.xml                   \
176         range-missing-min.gschema.xml                   \
177         range-parse-error.gschema.xml                   \
178         range-wrong-type.gschema.xml                    \
179         range.gschema.xml                               \
180         wrong-category.gschema.xml                      \
181         $(NULL)
182
183 test_programs += thumbnail-verification
184 dist_test_data += $(thumbnail_data_files)
185 thumbnail_data_files = $(addprefix thumbnails/,$(thumbnail_tests))
186 thumbnail_tests = \
187         bad-header.png \
188         empty-key.png \
189         header-and-chunk-size.png \
190         header-only.png \
191         huge-chunk-size.png \
192         mtime-zero.png \
193         no-text-data.png \
194         overlong-value.png \
195         uri-mismatch.png \
196         valid.png \
197         valid-no-size.png \
198         $(NULL)
199
200 test_programs += tls-certificate
201 tls_certificate_SOURCES = \
202         tls-certificate.c                       \
203         gtesttlsbackend.c                       \
204         gtesttlsbackend.h
205 dist_test_data += $(cert_data_files)
206 cert_data_files = $(addprefix cert-tests/,$(cert_tests))
207 cert_tests = \
208         cert1.pem       \
209         cert2.pem       \
210         cert3.pem       \
211         cert-key.pem    \
212         cert-list.pem   \
213         key8.pem        \
214         key-cert.pem    \
215         key.pem         \
216         nothing.pem     \
217         $(NULL)
218
219 uninstalled_test_extra_programs += socket-client
220 socket_client_SOURCES = \
221         socket-client.c                         \
222         gtlsconsoleinteraction.c                \
223         gtlsconsoleinteraction.h
224 EXTRA_DIST += socket-common.c
225
226 uninstalled_test_extra_programs += gdbus-daemon
227 nodist_gdbus_daemon_SOURCES = \
228         $(top_builddir)/gio/gdbus-daemon-generated.c
229 gdbus_daemon_SOURCES = \
230         gdbus-daemon.c                          \
231         $(top_srcdir)/gio/gdbusdaemon.c
232
233 # -----------------------------------------------------------------------------
234 #  Test programs buildable on UNIX only
235
236 if OS_UNIX
237 test_programs += \
238         contenttype                             \
239         file                                    \
240         gdbus-peer-object-manager               \
241         live-g-file                             \
242         socket-address                          \
243         unix-fd                                 \
244         unix-streams                            \
245         $(NULL)
246
247 test_extra_programs += \
248         basic-application                       \
249         $(NULL)
250
251 # Uninstalled because of the check-for-executable logic in DesktopAppInfo unable to find the installed executable
252 uninstalled_test_programs += \
253         appinfo                                 \
254         desktop-app-info                        \
255         $(NULL)
256
257 home_desktop_files = \
258         epiphany-weather-for-toronto-island-9c6a4e022b17686306243dada811d550d25eb1fb.desktop    \
259         eog.desktop
260
261 usr_desktop_files = \
262         baobab.desktop                          \
263         cheese.desktop                          \
264         dconf-editor.desktop                    \
265         eog.desktop                             \
266         evince-previewer.desktop                \
267         evince.desktop                          \
268         file-roller.desktop                     \
269         gcr-prompter.desktop                    \
270         gcr-viewer.desktop                      \
271         gedit.desktop                           \
272         glade.desktop                           \
273         gnome-clocks.desktop                    \
274         gnome-contacts.desktop                  \
275         gnome-font-viewer.desktop               \
276         gnome-music.desktop                     \
277         gnome-terminal.desktop                  \
278         gucharmap.desktop                       \
279         kde4/dolphin.desktop                    \
280         kde4/kate.desktop                       \
281         kde4/konqbrowser.desktop                \
282         kde4/okular.desktop                     \
283         mimeinfo.cache                          \
284         nautilus-autorun-software.desktop       \
285         nautilus-classic.desktop                \
286         nautilus-connect-server.desktop         \
287         nautilus.desktop                        \
288         totem.desktop                           \
289         yelp.desktop
290
291 dist_test_data += \
292         $(addprefix desktop-files/usr/applications/,$(usr_desktop_files))       \
293         $(addprefix desktop-files/home/applications/,$(home_desktop_files))
294
295 dist_test_data += \
296         appinfo-test-actions.desktop            \
297         appinfo-test-gnome.desktop              \
298         appinfo-test-notgnome.desktop           \
299         appinfo-test.desktop                    \
300         appinfo-test2.desktop                   \
301         file.c                                  \
302         org.gtk.test.dbusappinfo.desktop        \
303         x-content/image-dcf/DCIM/Camera/20130831_203925.jpg \
304         x-content/image-dcf/DCIM/Camera/20130831_203928.jpg \
305         x-content/unix-software/autorun.sh      \
306         x-content/win32-software/autorun.exe    \
307         $(NULL)
308
309 test_extra_programs += \
310         appinfo-test                            \
311         apps                                    \
312         $(NULL)
313
314 uninstalled_test_extra_programs += \
315         gdbus-example-unix-fd-client            \
316         $(NULL)
317
318 test_programs += mimeapps
319 clean-local: clean-mimeapps
320 clean-mimeapps:
321         rm -rf xdgdatadir xdgdatahome
322
323 uninstalled_test_programs += gsettings gschema-compile
324 gsettings_DEPENDENCIES = test.mo
325 CLEANFILES += test.mo de/LC_MESSAGES/test.mo
326 gsettings_CFLAGS = $(AM_CFLAGS) -DSRCDIR=\"$(abs_srcdir)\"
327 test.mo: de.po
328         $(AM_V_GEN) $(MSGFMT) -o test.mo $(srcdir)/de.po; \
329         $(MKDIR_P) de/LC_MESSAGES; \
330         cp -f test.mo de/LC_MESSAGES
331 EXTRA_DIST += de.po
332 dist_uninstalled_test_data += \
333         org.gtk.test.gschema.xml.orig           \
334         org.gtk.schemasourcecheck.gschema.xml   \
335         testenum.h                              \
336         enums.xml.template
337 # Generated while running the testcase itself...
338 CLEANFILES += \
339         org.gtk.test.gschema.xml        \
340         org.gtk.test.enums.xml          \
341         gsettings.store                 \
342         gschemas.compiled               \
343         schema-source/gschemas.compiled
344
345 test_programs += gdbus-connection-flush
346 gdbus_connection_flush_SOURCES = \
347         gdbus-connection-flush.c                \
348         test-io-stream.c                        \
349         test-io-stream.h                        \
350         test-pipe-unix.c                        \
351         test-pipe-unix.h
352
353 test_programs += gdbus-non-socket
354 gdbus_non_socket_SOURCES = \
355         gdbus-non-socket.c                      \
356         gdbus-tests.c                           \
357         gdbus-tests.h                           \
358         test-io-stream.c                        \
359         test-io-stream.h                        \
360         test-pipe-unix.c                        \
361         test-pipe-unix.h
362
363 # These three are manual-run tests because they need a session bus but don't bring one up themselves
364 uninstalled_test_extra_programs += gdbus-example-objectmanager-client
365 gdbus_example_objectmanager_client_LDADD = gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
366
367 test_extra_programs += gsubprocess-testprog
368
369 uninstalled_test_extra_programs += gdbus-test-fixture
370 gdbus_test_fixture_LDADD = gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
371
372 # This is peer to peer so it doesn't need a session bus (so we can run it normally)
373 test_programs += gdbus-peer
374 gdbus_peer_LDADD = gdbus-object-manager-example/libgdbus-example-objectmanager.la $(LDADD)
375
376 # This test is currently unreliable
377 test_extra_programs += gdbus-overflow
378
379 # -----------------------------------------------------------------------------
380 #  Test programs that need to bring up a session bus (requires dbus-daemon)
381
382 if HAVE_DBUS_DAEMON
383 gdbus_sessionbus_sources = gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
384
385 test_programs += \
386         actions                                 \
387         dbus-appinfo                            \
388         gapplication                            \
389         gdbus-auth                              \
390         gdbus-bz627724                          \
391         gdbus-close-pending                     \
392         gdbus-connection                        \
393         gdbus-connection-loss                   \
394         gdbus-connection-slow                   \
395         gdbus-error                             \
396         gdbus-exit-on-close                     \
397         gdbus-export                            \
398         gdbus-introspection                     \
399         gdbus-names                             \
400         gdbus-proxy                             \
401         gdbus-proxy-threads                     \
402         gdbus-proxy-well-known-name             \
403         gdbus-test-codegen                      \
404         gdbus-test-codegen-old                  \
405         gdbus-threading                         \
406         gmenumodel                              \
407         gnotification                           \
408         $(NULL)
409
410 gdbus_proxy_threads_CFLAGS = $(AM_CFLAGS) $(DBUS1_CFLAGS)
411 actions_SOURCES                          = $(gdbus_sessionbus_sources) actions.c
412 dbus_appinfo_SOURCES                     = $(gdbus_sessionbus_sources) dbus-appinfo.c
413 gapplication_SOURCES                     = $(gdbus_sessionbus_sources) gapplication.c
414 gdbus_auth_SOURCES                       = $(gdbus_sessionbus_sources) gdbus-auth.c
415 gdbus_bz627724_SOURCES                   = $(gdbus_sessionbus_sources) gdbus-bz627724.c
416 gdbus_close_pending_SOURCES              = $(gdbus_sessionbus_sources) gdbus-close-pending.c
417 gdbus_connection_SOURCES                 = $(gdbus_sessionbus_sources) gdbus-connection.c
418 gdbus_connection_loss_SOURCES            = $(gdbus_sessionbus_sources) gdbus-connection-loss.c
419 gdbus_connection_slow_SOURCES            = $(gdbus_sessionbus_sources) gdbus-connection-slow.c
420 gdbus_error_SOURCES                      = $(gdbus_sessionbus_sources) gdbus-error.c
421 gdbus_exit_on_close_SOURCES              = $(gdbus_sessionbus_sources) gdbus-exit-on-close.c
422 gdbus_export_SOURCES                     = $(gdbus_sessionbus_sources) gdbus-export.c
423 gdbus_introspection_SOURCES              = $(gdbus_sessionbus_sources) gdbus-introspection.c
424 gdbus_names_SOURCES                      = $(gdbus_sessionbus_sources) gdbus-names.c
425 gdbus_proxy_SOURCES                      = $(gdbus_sessionbus_sources) gdbus-proxy.c
426 gdbus_proxy_threads_SOURCES              = $(gdbus_sessionbus_sources) gdbus-proxy-threads.c
427 gdbus_proxy_well_known_name_SOURCES      = $(gdbus_sessionbus_sources) gdbus-proxy-well-known-name.c
428 gdbus_test_codegen_SOURCES               = $(gdbus_sessionbus_sources) gdbus-test-codegen.c
429 nodist_gdbus_test_codegen_SOURCES        = gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
430 gdbus_test_codegen_old_SOURCES           = $(gdbus_sessionbus_sources) gdbus-test-codegen.c
431 nodist_gdbus_test_codegen_old_SOURCES    = gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
432 gdbus_test_codegen_old_CPPFLAGS          = $(AM_CPPFLAGS) -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_36 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_36
433 gdbus_threading_SOURCES                  = $(gdbus_sessionbus_sources) gdbus-threading.c
434 gmenumodel_SOURCES                       = $(gdbus_sessionbus_sources) gmenumodel.c
435 gnotification_SOURCES                    = $(gdbus_sessionbus_sources) gnotification.c gnotification-server.h gnotification-server.c
436
437 gdbus-test-codegen.o: gdbus-test-codegen-generated.h
438 gdbus-test-codegen-generated.h gdbus-test-codegen-generated.c: test-codegen.xml Makefile $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen
439         $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
440                 UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
441                 $(PYTHON) $(top_builddir)/gio/gdbus-2.0/codegen/gdbus-codegen \
442                 --interface-prefix org.project. \
443                 --generate-c-code gdbus-test-codegen-generated \
444                 --c-generate-object-manager \
445                 --c-namespace Foo_iGen \
446                 --generate-docbook gdbus-test-codegen-generated-doc \
447                 --annotate "org.project.Bar" Key1 Value1 \
448                 --annotate "org.project.Bar" org.gtk.GDBus.Internal Value2 \
449                 --annotate "org.project.Bar.HelloWorld()" Key3 Value3 \
450                 --annotate "org.project.Bar::TestSignal" Key4 Value4 \
451                 --annotate "org.project.Bar:ay" Key5 Value5 \
452                 --annotate "org.project.Bar.TestPrimitiveTypes()[val_int32]" Key6 Value6 \
453                 --annotate "org.project.Bar.TestPrimitiveTypes()[ret_uint32]" Key7 Value7 \
454                 --annotate "org.project.Bar::TestSignal[array_of_strings]" Key8 Value8 \
455                 $(srcdir)/test-codegen.xml \
456                 $(NULL)
457
458 EXTRA_DIST += test-codegen.xml
459 CLEANFILES += gdbus-test-codegen-generated.[ch] gdbus-test-codegen-generated-doc-*.xml
460 endif # OS_UNIX
461 endif # HAVE_DBUS_DAEMON
462
463 tls_interaction_SOURCES = tls-interaction.c gtesttlsbackend.c gtesttlsbackend.h
464
465 # -----------------------------------------------------------------------------
466
467 if OS_WIN32
468 test_programs += win32-streams
469 endif
470
471 if PLATFORM_WIN32
472 no_undefined = -no-undefined
473 endif
474
475 if HAVE_DBUS1
476 test_programs += gdbus-serialization
477 gdbus_serialization_CFLAGS = $(AM_CFLAGS) $(DBUS1_CFLAGS)
478 gdbus_serialization_LDADD = $(LDADD) $(DBUS1_LIBS)
479 gdbus_serialization_SOURCES = \
480         gdbus-serialization.c                   \
481         gdbus-tests.h                           \
482         gdbus-tests.c
483 endif
484
485 # -----------------------------------------------------------------------------
486 #  The resources test is a bit more complicated...
487
488 test_programs += resources
489 resources_SOURCES = resources.c
490 nodist_resources_SOURCES = test_resources.c test_resources2.c test_resources2.h
491 resources_DEPENDENCIES = test.gresource
492
493 test_ltlibraries += libresourceplugin.la
494 libresourceplugin_la_SOURCES = resourceplugin.c plugin_resources.c
495 libresourceplugin_la_LDFLAGS = -avoid-version -module -export-dynamic $(no_undefined)
496 libresourceplugin_la_LIBADD = $(LDADD)
497
498 # libtool contains a bug whereby the created .la file doesn't contain the correct dlname='' in the case that
499 # you're building a library but not installing it.  This is apparently because the only considered use for an
500 # uninstalled library is as a convenience library for linking (despite the fact that we give -module).  The lack
501 # of dlname='' in the .la trips up libltdl and GModule as well.  We can trick libtool into believing that we
502 # will install the module by giving it a bogus -rpath for the uninstalled cases.
503 #
504 # See http://lists.gnu.org/archive/html/bug-libtool/2013-05/msg00009.html
505 if !ENABLE_INSTALLED_TESTS
506 libresourceplugin_la_LDFLAGS += -rpath /
507 endif
508
509 if CROSS_COMPILING
510   glib_compile_resources=$(GLIB_COMPILE_RESOURCES)
511 else
512   glib_compile_resources=$(top_builddir)/gio/glib-compile-resources
513 endif
514
515 resources.o: test_resources2.h
516 test_resources.c: test2.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test2.gresource.xml)
517         $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_test1 $<
518
519 test_resources2.h test_resources2.c: test3.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test3.gresource.xml)
520         $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate --c-name _g_test2 --manual-register $<
521
522 plugin_resources.c: test4.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test4.gresource.xml)
523         $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_plugin $<
524
525 test.gresource: test.gresource.xml Makefile $(shell $(glib_compile_resources) --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/test.gresource.xml)
526         $(AM_V_GEN) $(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) $<
527
528 EXTRA_DIST += test.gresource.xml test1.txt test2.gresource.xml test2.txt test3.gresource.xml test3.txt test4.gresource.xml
529
530 CLEANFILES += test_resources.c test_resources2.[ch] plugin_resources.c test.gresource
531
532 BUILT_SOURCES: giotypefuncs.c
533
534 giotypefuncs.c: Makefile
535         $(AM_V_GEN) echo '#include <gio/gio.h>' > xgen-giosrc.c && \
536           echo "G_GNUC_BEGIN_IGNORE_DEPRECATIONS" > xgen-gio && \
537           ${CPP} $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) xgen-giosrc.c | \
538           $(GREP) -o '\bg_.*_get_type\b' | \
539           $(GREP) -v 'g_io_extension_get_type\|g_variant_get_type' | \ 
540           sort | uniq | \
541           $(SED) -e 's/^/*tp++ = /' -e 's/$$/ ();/' >> xgen-gio && \
542           cp xgen-gio $@ # && rm -f xgen-gio xgen-giosrc.c