Makefile.am 2.77 KB
Newer Older
1
include $(top_srcdir)/glib.mk
2

3
LDADD = $(top_builddir)/gobject/libgobject-2.0.la $(top_builddir)/glib/libglib-2.0.la
4 5 6
AM_CPPFLAGS = $(gmodule_INCLUDES) $(GLIB_DEBUG_FLAGS)
DEFS = -DGLIB_DISABLE_DEPRECATION_WARNINGS -DG_LOG_DOMAIN=\"GLib\"
AM_CFLAGS = -g
7

8 9 10 11 12
# So far, only two gtester-ified cases
test_programs = \
	gvalue-test				\
	paramspec-test				\
	$(NULL)
13

14 15 16 17 18 19 20 21
# These are not yet gtester-ified, so mark them as for 'installed' only so we
# don't run them under the framework.  We will handle them manually below.
installed_test_programs = \
	deftype					\
	accumulator				\
	defaultiface				\
	dynamictype				\
	override				\
22
	signals					\
23 24 25
	singleton				\
	references				\
	$(NULL)
26

27 28 29 30 31 32 33 34 35
# Don't install these ones, and keep them out of 'make check' because they take too long...
noinst_PROGRAMS += \
	performance				\
	performance-threaded			\
	$(NULL)

# Run the 'installed' tests manually in-tree.
# This will cause them to be built even if installed tests are disabled.
check_PROGRAMS += $(installed_test_programs) $(installed_test_extra_programs)
36
TESTS += $(installed_test_programs)
37 38 39 40
TESTS_ENVIRONMENT = \
	LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset    \
	MALLOC_CHECK_=2                                         \
	MALLOC_PERTURB_=$$(($${RANDOM:-256} % 256))
41

42
accumulator_SOURCES = accumulator.c testmarshal.c testmarshal.h
43
signals_SOURCES = signals.c
44 45
defaultiface_SOURCES = defaultiface.c testmodule.c testmodule.h
dynamictype_SOURCES = dynamictype.c testmodule.c testmodule.h
46

47 48 49
if ENABLE_TIMELOOP
installed_test_programs += timeloop-closure
endif
50

51 52 53 54
# The marshal test requires running a binary, which means we cannot
# build it when cross-compiling
if !CROSS_COMPILING
glib_genmarshal=$(top_builddir)/gobject/glib-genmarshal
55 56 57 58

testmarshal.h: stamp-testmarshal.h
	@true
stamp-testmarshal.h: @REBUILD@ testmarshal.list $(glib_genmarshal)
59
	$(AM_V_GEN) $(glib_genmarshal) --prefix=test_marshal $(srcdir)/testmarshal.list --header >> xgen-gmh \
60 61 62
	&& (cmp -s xgen-gmh testmarshal.h 2>/dev/null || cp xgen-gmh testmarshal.h) \
	&& rm -f xgen-gmh xgen-gmh~ \
	&& echo timestamp > $@
63 64
testmarshal.c: @REBUILD@ testmarshal.h testmarshal.list $(glib_genmarshal)
	$(AM_V_GEN) (echo "#include \"testmarshal.h\""; $(glib_genmarshal) --prefix=test_marshal $(srcdir)/testmarshal.list --body) >> xgen-gmc \
65 66 67
	&& cp xgen-gmc testmarshal.c \
	&& rm -f xgen-gmc xgen-gmc~

68 69
BUILT_SOURCES += testmarshal.h testmarshal.c
CLEANFILES += stamp-testmarshal.h
70 71 72
EXTRA_DIST += testcommon.h testmarshal.list
BUILT_EXTRA_DIST += testmarshal.h testmarshal.c
endif # !CROSS_COMPILING
73

Owen Taylor's avatar
Owen Taylor committed
74
dist-hook: $(BUILT_EXTRA_DIST)
75 76 77 78 79
	files='$(BUILT_EXTRA_DIST)';				\
	for f in $$files; do					\
	  if test -f $$f; then d=.; else d=$(srcdir); fi;	\
	  cp $$d/$$f $(distdir) || exit 1; done

Owen Taylor's avatar
Owen Taylor committed
80
distclean-local:
81 82 83
	if test $(srcdir) = .; then :; else	\
	    rm -f $(BUILT_EXTRA_DIST);		\
	fi