1 include $(top_srcdir)/Makefile.decl
3 insttestdir = $(pkglibexecdir)/installed-tests
5 SUBDIRS=gobject refcount
9 -DGLIB_DISABLE_DEPRECATION_WARNINGS \
10 -DG_LOG_DOMAIN=\"GLib\" \
17 libglib = $(top_builddir)/glib/libglib-2.0.la
18 libgthread = $(top_builddir)/gthread/libgthread-2.0.la
19 libgmodule = $(top_builddir)/gmodule/libgmodule-2.0.la
20 libgobject = $(top_builddir)/gobject/libgobject-2.0.la
22 libadd_libgmodule = $(libgmodule)
23 libadd_libglib = $(libglib)
25 no_undefined = -no-undefined
27 module_test_exp = module-test.exp
29 module-test.exp: module-test.o
30 $(DLLTOOL) --output-exp module-test.exp module-test.o
32 spawn_test_win32_gui = spawn-test-win32-gui
34 spawn_test_win32_gui_LDFLAGS = -mwindows
45 iochannel-test-infile \
55 cxx_test_LDADD = $(progs_ldadd)
56 cxx_test_SOURCES = cxx-test.C
62 timeloop = timeloop timeloop-closure
64 noinst_PROGRAMS = $(TEST_PROGS) \
74 TEST_PROGS += testglib
75 testglib_SOURCES = testglib.c
76 testglib_LDADD = $(libglib)
79 testgdate_LDADD = $(libglib)
80 testgdateparser_LDADD = $(libglib)
81 unicode_normalize_LDADD = $(libglib)
82 unicode_collate_LDADD = $(libglib)
83 assert_msg_test_LDADD = $(libglib)
85 timeloop_LDADD = $(libglib)
86 timeloop_closure_LDADD = $(libglib) $(libgobject)
88 datetime_LDADD = $(libglib)
89 testgobject_LDADD = $(libglib) $(libgobject)
115 $(spawn_test_win32_gui) \
122 test_scripts = run-collate-tests.sh run-assert-msg-test.sh
124 test_script_support_programs = unicode-collate
126 check_PROGRAMS = $(test_programs) $(test_script_support_programs)
128 TESTS = $(test_programs) $(test_scripts)
129 TESTS_ENVIRONMENT = srcdir=$(srcdir) \
130 LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset \
132 MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
135 iochannel-test-infile \
141 if BUILDOPT_INSTALL_TESTS
142 insttest_PROGRAMS = $(test_programs)
144 testmetadir = $(datadir)/installed-tests/$(PACKAGE)
145 testmeta_DATA = $(test_programs:=.test)
147 insttest_DATA = $(test_data)
149 %.test: %$(EXEEXT) Makefile
150 $(AM_V_GEN) (echo '[Test]' > $@.tmp; \
151 echo 'Type=session' >> $@.tmp; \
152 echo 'Exec=env G_TEST_DATA=$(pkglibexecdir)/installed-tests $(pkglibexecdir)/installed-tests/$<' >> $@.tmp; \
157 progs_ldadd = $(EFENCE) $(libglib) $(EFENCE)
158 thread_ldadd = $(libgthread) $(G_THREAD_LIBS) $(progs_ldadd)
159 module_ldadd = $(libgmodule) $(G_MODULE_LIBS) $(progs_ldadd)
161 atomic_test_LDADD = $(progs_ldadd)
162 bit_test_LDADD = $(progs_ldadd)
163 child_test_LDADD = $(thread_ldadd)
164 completion_test_LDADD = $(progs_ldadd)
165 dirname_test_LDADD = $(progs_ldadd)
166 file_test_LDADD = $(progs_ldadd)
167 env_test_LDADD = $(progs_ldadd)
168 gio_test_LDADD = $(progs_ldadd)
169 iochannel_test_LDADD = $(progs_ldadd)
170 mainloop_test_LDADD = $(thread_ldadd)
171 mapping_test_LDADD = $(progs_ldadd)
172 module_test_LDADD = $(module_ldadd) $(module_test_exp)
173 module_test_LDFLAGS = $(G_MODULE_LDFLAGS)
174 onceinit_LDADD = $(thread_ldadd)
175 asyncqueue_test_LDADD = $(thread_ldadd)
176 qsort_test_LDADD = $(progs_ldadd)
177 relation_test_LDADD = $(progs_ldadd)
178 slice_test_SOURCES = slice-test.c memchunks.c
179 slice_test_LDADD = $(thread_ldadd)
180 slice_color_SOURCES = slice-color.c memchunks.c
181 slice_color_LDADD = $(thread_ldadd)
182 slice_concurrent_SOURCES = slice-concurrent.c
183 slice_concurrent_LDADD = $(thread_ldadd)
184 slice_threadinit_SOURCES = slice-threadinit.c
185 slice_threadinit_LDADD = $(thread_ldadd)
186 sources_LDADD = $(progs_ldadd)
187 spawn_test_LDADD = $(progs_ldadd)
188 thread_test_LDADD = $(thread_ldadd)
189 threadpool_test_LDADD = $(thread_ldadd)
190 type_test_LDADD = $(progs_ldadd)
191 unicode_encoding_LDADD = $(progs_ldadd)
192 unicode_caseconv_LDADD = $(progs_ldadd)
194 if BUILDOPT_INSTALL_TESTS
195 insttest_LTLIBRARIES = libmoduletestplugin_a.la libmoduletestplugin_b.la
197 noinst_LTLIBRARIES = libmoduletestplugin_a.la libmoduletestplugin_b.la
200 libmoduletestplugin_a_la_SOURCES = libmoduletestplugin_a.c
201 libmoduletestplugin_a_la_LDFLAGS = $(G_MODULE_LDFLAGS) -avoid-version -module $(no_undefined) -rpath $(insttestdir)
202 libmoduletestplugin_a_la_LIBADD = $(G_MODULE_LIBS) $(libadd_libgmodule) $(libadd_libglib)
204 libmoduletestplugin_b_la_SOURCES = libmoduletestplugin_b.c
205 libmoduletestplugin_b_la_LDFLAGS = $(G_MODULE_LDFLAGS) -avoid-version -module $(no_undefined) -rpath $(insttestdir)
206 libmoduletestplugin_b_la_LIBADD = $(G_MODULE_LIBS) $(libadd_libgmodule) $(libadd_libglib)
208 dist-hook: $(BUILT_EXTRA_DIST)
209 files='$(BUILT_EXTRA_DIST)'; \
210 for f in $$files; do \
211 if test -f $$f; then d=.; else d=$(srcdir); fi; \
212 cp $$d/$$f $(distdir) || exit 1; done
213 mkdir $(distdir)/collate; \
214 for f in $(srcdir)/collate/* ; do \
215 if test -f $$f; then cp $$f $(distdir)/collate; fi; done
218 iochannel-test-outfile \
219 file-test-get-contents \