build: Drop --enable-rebuilds configure option
[glib.git] / tests / gobject / Makefile.am
blobaa5dbb60223b5ee93a0383ca8d155366c12a7e1f
1 include $(top_srcdir)/glib.mk
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
8 # So far, only two gtester-ified cases
9 test_programs = \
10         gvalue-test                             \
11         paramspec-test                          \
12         $(NULL)
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         testgobject                             \
26         $(NULL)
28 # Don't install these ones, and keep them out of 'make check' because they take too long...
29 noinst_PROGRAMS += \
30         performance                             \
31         performance-threaded                    \
32         $(NULL)
34 # Run the 'installed' tests manually in-tree.
35 # This will cause them to be built even if installed tests are disabled.
36 check_PROGRAMS += $(installed_test_programs) $(installed_test_extra_programs)
37 TESTS += $(installed_test_programs)
38 AM_TESTS_ENVIRONMENT = \
39         LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset    \
40         MALLOC_CHECK_=2                                         \
41         MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
43 accumulator_SOURCES = accumulator.c testmarshal.c testmarshal.h
44 signals_SOURCES = signals.c
45 defaultiface_SOURCES = defaultiface.c testmodule.c testmodule.h
46 dynamictype_SOURCES = dynamictype.c testmodule.c testmodule.h
47 testgobject_SOURCES = testgobject.c
49 if ENABLE_TIMELOOP
50 installed_test_programs += timeloop-closure
51 endif
53 # The marshal test requires running a binary, which means we cannot
54 # build it when cross-compiling
55 if !CROSS_COMPILING
56 glib_genmarshal=$(top_builddir)/gobject/glib-genmarshal
58 testmarshal.h: stamp-testmarshal.h
59         @true
60 stamp-testmarshal.h: testmarshal.list $(glib_genmarshal)
61         $(AM_V_GEN) $(glib_genmarshal) --prefix=test_marshal $(srcdir)/testmarshal.list --header >> xgen-gmh \
62         && (cmp -s xgen-gmh testmarshal.h 2>/dev/null || cp xgen-gmh testmarshal.h) \
63         && rm -f xgen-gmh xgen-gmh~ \
64         && echo timestamp > $@
65 testmarshal.c: testmarshal.h testmarshal.list $(glib_genmarshal)
66         $(AM_V_GEN) (echo "#include \"testmarshal.h\""; $(glib_genmarshal) --prefix=test_marshal $(srcdir)/testmarshal.list --body) >> xgen-gmc \
67         && cp xgen-gmc testmarshal.c \
68         && rm -f xgen-gmc xgen-gmc~
70 BUILT_SOURCES += testmarshal.h testmarshal.c
71 CLEANFILES += stamp-testmarshal.h
72 EXTRA_DIST += testcommon.h testmarshal.list
73 BUILT_EXTRA_DIST += testmarshal.h testmarshal.c
74 endif # !CROSS_COMPILING
76 dist-hook: $(BUILT_EXTRA_DIST)
77         files='$(BUILT_EXTRA_DIST)';                            \
78         for f in $$files; do                                    \
79           if test -f $$f; then d=.; else d=$(srcdir); fi;       \
80           cp $$d/$$f $(distdir) || exit 1; done
82 distclean-local:
83         if test $(srcdir) = .; then :; else     \
84             rm -f $(BUILT_EXTRA_DIST);          \
85         fi