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\" \
11 -DSRCDIR=\"$(srcdir)\" \
18 libglib = $(top_builddir)/glib/libglib-2.0.la
19 libgthread = $(top_builddir)/gthread/libgthread-2.0.la
20 libgmodule = $(top_builddir)/gmodule/libgmodule-2.0.la
21 libgobject = $(top_builddir)/gobject/libgobject-2.0.la
23 libadd_libgmodule = $(libgmodule)
24 libadd_libglib = $(libglib)
26 no_undefined = -no-undefined
28 module_test_exp = module-test.exp
30 module-test.exp: module-test.o
31 $(DLLTOOL) --output-exp module-test.exp module-test.o
33 spawn_test_win32_gui = spawn-test-win32-gui
35 spawn_test_win32_gui_LDFLAGS = -mwindows
46 iochannel-test-infile \
56 cxx_test_LDADD = $(progs_ldadd)
57 cxx_test_SOURCES = cxx-test.C
63 timeloop = timeloop timeloop-closure
65 noinst_PROGRAMS = $(TEST_PROGS) \
75 TEST_PROGS += testglib
76 testglib_SOURCES = testglib.c
77 testglib_LDADD = $(libglib)
80 testgdate_LDADD = $(libglib)
81 testgdateparser_LDADD = $(libglib)
82 unicode_normalize_LDADD = $(libglib)
83 unicode_collate_LDADD = $(libglib)
84 assert_msg_test_LDADD = $(libglib)
86 timeloop_LDADD = $(libglib)
87 timeloop_closure_LDADD = $(libglib) $(libgobject)
89 datetime_LDADD = $(libglib)
90 testgobject_LDADD = $(libglib) $(libgobject)
116 $(spawn_test_win32_gui) \
123 test_scripts = run-collate-tests.sh run-assert-msg-test.sh
125 test_script_support_programs = unicode-collate
127 check_PROGRAMS = $(test_programs) $(test_script_support_programs)
129 TESTS = $(test_programs) $(test_scripts)
130 TESTS_ENVIRONMENT = srcdir=$(srcdir) \
131 LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset \
133 MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
136 iochannel-test-infile \
142 if BUILDOPT_INSTALL_TESTS
143 insttest_PROGRAMS = $(test_programs)
145 testmetadir = $(datadir)/installed-tests/$(PACKAGE)
146 testmeta_DATA = $(test_programs:=.test)
148 insttest_DATA = $(test_data)
150 %.test: %$(EXEEXT) Makefile
151 $(AM_V_GEN) (echo '[Test]' > $@.tmp; \
152 echo 'Type=session' >> $@.tmp; \
153 echo 'Exec=env G_TEST_DATA=$(pkglibexecdir)/installed-tests $(pkglibexecdir)/installed-tests/$<' >> $@.tmp; \
158 progs_ldadd = $(EFENCE) $(libglib) $(EFENCE)
159 thread_ldadd = $(libgthread) $(G_THREAD_LIBS) $(progs_ldadd)
160 module_ldadd = $(libgmodule) $(G_MODULE_LIBS) $(progs_ldadd)
162 atomic_test_LDADD = $(progs_ldadd)
163 bit_test_LDADD = $(progs_ldadd)
164 child_test_LDADD = $(thread_ldadd)
165 completion_test_LDADD = $(progs_ldadd)
166 dirname_test_LDADD = $(progs_ldadd)
167 file_test_LDADD = $(progs_ldadd)
168 env_test_LDADD = $(progs_ldadd)
169 gio_test_LDADD = $(progs_ldadd)
170 iochannel_test_LDADD = $(progs_ldadd)
171 mainloop_test_LDADD = $(thread_ldadd)
172 mapping_test_LDADD = $(progs_ldadd)
173 module_test_LDADD = $(module_ldadd) $(module_test_exp)
174 module_test_LDFLAGS = $(G_MODULE_LDFLAGS)
175 onceinit_LDADD = $(thread_ldadd)
176 asyncqueue_test_LDADD = $(thread_ldadd)
177 qsort_test_LDADD = $(progs_ldadd)
178 relation_test_LDADD = $(progs_ldadd)
179 slice_test_SOURCES = slice-test.c memchunks.c
180 slice_test_LDADD = $(thread_ldadd)
181 slice_color_SOURCES = slice-color.c memchunks.c
182 slice_color_LDADD = $(thread_ldadd)
183 slice_concurrent_SOURCES = slice-concurrent.c
184 slice_concurrent_LDADD = $(thread_ldadd)
185 slice_threadinit_SOURCES = slice-threadinit.c
186 slice_threadinit_LDADD = $(thread_ldadd)
187 sources_LDADD = $(progs_ldadd)
188 spawn_test_LDADD = $(progs_ldadd)
189 thread_test_LDADD = $(thread_ldadd)
190 threadpool_test_LDADD = $(thread_ldadd)
191 type_test_LDADD = $(progs_ldadd)
192 unicode_encoding_LDADD = $(progs_ldadd)
193 unicode_caseconv_LDADD = $(progs_ldadd)
195 if BUILDOPT_INSTALL_TESTS
196 insttest_LTLIBRARIES = libmoduletestplugin_a.la libmoduletestplugin_b.la
198 noinst_LTLIBRARIES = libmoduletestplugin_a.la libmoduletestplugin_b.la
201 libmoduletestplugin_a_la_SOURCES = libmoduletestplugin_a.c
202 libmoduletestplugin_a_la_LDFLAGS = $(G_MODULE_LDFLAGS) -avoid-version -module $(no_undefined) -rpath $(insttestdir)
203 libmoduletestplugin_a_la_LIBADD = $(G_MODULE_LIBS) $(libadd_libgmodule) $(libadd_libglib)
205 libmoduletestplugin_b_la_SOURCES = libmoduletestplugin_b.c
206 libmoduletestplugin_b_la_LDFLAGS = $(G_MODULE_LDFLAGS) -avoid-version -module $(no_undefined) -rpath $(insttestdir)
207 libmoduletestplugin_b_la_LIBADD = $(G_MODULE_LIBS) $(libadd_libgmodule) $(libadd_libglib)
209 dist-hook: $(BUILT_EXTRA_DIST)
210 files='$(BUILT_EXTRA_DIST)'; \
211 for f in $$files; do \
212 if test -f $$f; then d=.; else d=$(srcdir); fi; \
213 cp $$d/$$f $(distdir) || exit 1; done
214 mkdir $(distdir)/collate; \
215 for f in $(srcdir)/collate/* ; do \
216 if test -f $$f; then cp $$f $(distdir)/collate; fi; done
219 iochannel-test-outfile \
220 file-test-get-contents \