[kdbus] KDBUS_ITEM_PAYLOAD_OFF items are (once again) relative to msg header
[platform/upstream/glib.git] / tests / gobject / Makefile.am
1 include $(top_srcdir)/glib.mk
2
3 LDADD = $(top_builddir)/gobject/libgobject-2.0.la $(top_builddir)/glib/libglib-2.0.la
4 AM_CPPFLAGS = $(gmodule_INCLUDES) $(GLIB_DEBUG_FLAGS)
5 DEFS = -DGLIB_DISABLE_DEPRECATION_WARNINGS -DG_LOG_DOMAIN=\"GLib\"
6 AM_CFLAGS = -g
7
8 # So far, only two gtester-ified cases
9 test_programs = \
10         gvalue-test                             \
11         paramspec-test                          \
12         $(NULL)
13
14 # These are not yet gtester-ified, so mark them as for 'installed' only so we
15 # don't run them under the framework.  We will handle them manually below.
16 installed_test_programs = \
17         deftype                                 \
18         accumulator                             \
19         defaultiface                            \
20         dynamictype                             \
21         override                                \
22         signals                                 \
23         singleton                               \
24         references                              \
25         $(NULL)
26
27 # Don't install these ones, and keep them out of 'make check' because they take too long...
28 noinst_PROGRAMS += \
29         performance                             \
30         performance-threaded                    \
31         $(NULL)
32
33 # Run the 'installed' tests manually in-tree.
34 # This will cause them to be built even if installed tests are disabled.
35 check_PROGRAMS += $(installed_test_programs) $(installed_test_extra_programs)
36 TESTS += $(installed_test_programs)
37 TESTS_ENVIRONMENT = \
38         LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset    \
39         MALLOC_CHECK_=2                                         \
40         MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
41
42 accumulator_SOURCES = accumulator.c testmarshal.c testmarshal.h
43 signals_SOURCES = signals.c
44 defaultiface_SOURCES = defaultiface.c testmodule.c testmodule.h
45 dynamictype_SOURCES = dynamictype.c testmodule.c testmodule.h
46
47 if ENABLE_TIMELOOP
48 installed_test_programs += timeloop-closure
49 endif
50
51 if CROSS_COMPILING
52   glib_genmarshal=$(GLIB_GENMARSHAL)
53 else
54   glib_genmarshal=$(top_builddir)/gobject/glib-genmarshal
55 endif
56
57 testmarshal.h: stamp-testmarshal.h
58         @true
59 stamp-testmarshal.h: @REBUILD@ testmarshal.list $(glib_genmarshal)
60         $(AM_V_GEN) $(glib_genmarshal) --prefix=test_marshal $(srcdir)/testmarshal.list --header >> xgen-gmh \
61         && (cmp -s xgen-gmh testmarshal.h 2>/dev/null || cp xgen-gmh testmarshal.h) \
62         && rm -f xgen-gmh xgen-gmh~ \
63         && echo timestamp > $@
64 testmarshal.c: @REBUILD@ testmarshal.h testmarshal.list $(glib_genmarshal)
65         $(AM_V_GEN) (echo "#include \"testmarshal.h\""; $(glib_genmarshal) --prefix=test_marshal $(srcdir)/testmarshal.list --body) >> xgen-gmc \
66         && cp xgen-gmc testmarshal.c \
67         && rm -f xgen-gmc xgen-gmc~
68
69 BUILT_SOURCES += testmarshal.h testmarshal.c
70 CLEANFILES += stamp-testmarshal.h
71
72 EXTRA_DIST += \
73         testcommon.h                            \
74         testmarshal.list
75
76 BUILT_EXTRA_DIST += \
77         testmarshal.h                           \
78         testmarshal.c
79
80 dist-hook: $(BUILT_EXTRA_DIST)
81         files='$(BUILT_EXTRA_DIST)';                            \
82         for f in $$files; do                                    \
83           if test -f $$f; then d=.; else d=$(srcdir); fi;       \
84           cp $$d/$$f $(distdir) || exit 1; done
85
86 distclean-local:
87         if test $(srcdir) = .; then :; else     \
88             rm -f $(BUILT_EXTRA_DIST);          \
89         fi