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