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