2 noinst_LTLIBRARIES = libregress.la libgimarshallingtests.la
4 nodist_libregress_la_SOURCES = $(GI_DATADIR)/tests/regress.c $(GI_DATADIR)/tests/regress.h
5 libregress_la_CFLAGS = $(GIO_CFLAGS) $(PYCAIRO_CFLAGS)
6 libregress_la_LDFLAGS = -module -avoid-version $(GIO_LIBS) $(PYCAIRO_LIBS)
7 nodist_libgimarshallingtests_la_SOURCES = $(GI_DATADIR)/tests/gimarshallingtests.c $(GI_DATADIR)/tests/gimarshallingtests.h
8 libgimarshallingtests_la_CFLAGS = $(GLIB_CFLAGS)
9 libgimarshallingtests_la_LDFLAGS = -module -avoid-version $(GLIB_LIBS)
11 # This is a hack to make sure a shared library is built
12 libregress.la: $(libregress_la_OBJECTS) $(libregress_la_DEPENDENCIES)
13 $(LINK) -rpath $(pkgpyexecdir) $(libregress_la_LDFLAGS) $(libregress_la_OBJECTS) $(libregress_la_LIBADD) $(LIBS)
15 libgimarshallingtests.la: $(libgimarshallingtests_la_OBJECTS) $(libgimarshallingtests_la_DEPENDENCIES)
16 $(LINK) -rpath $(pkgpyexecdir) $(libgimarshallingtests_la_LDFLAGS) $(libgimarshallingtests_la_OBJECTS) $(libgimarhallingtests_la_LIBADD) $(LIBS)
18 # g-i doesn't ship these as shared libraries anymore; we build them here
19 Regress-1.0.gir: libregress.la Makefile
20 $(AM_V_GEN) g-ir-scanner --include=cairo-1.0 --include=Gio-2.0 \
21 --namespace=Regress --nsversion=1.0 \
22 --warn-all --warn-error \
23 --library=libregress.la \
24 --libtool="$(top_builddir)/libtool" \
26 $(nodist_libregress_la_SOURCES)
27 Regress-1.0.typelib: Regress-1.0.gir Makefile
28 $(AM_V_GEN) g-ir-compiler $< -o $@
30 GIMarshallingTests-1.0.gir: libgimarshallingtests.la Makefile
31 $(AM_V_GEN) g-ir-scanner --include=Gio-2.0 \
32 --namespace=GIMarshallingTests --nsversion=1.0 --symbol-prefix=gi_marshalling_tests \
33 --warn-all --warn-error \
34 --library=libgimarshallingtests.la \
35 --libtool="$(top_builddir)/libtool" \
37 $(nodist_libgimarshallingtests_la_SOURCES)
38 GIMarshallingTests-1.0.typelib: GIMarshallingTests-1.0.gir Makefile
39 $(AM_V_GEN) g-ir-compiler $< -o $@
41 gschemas.compiled: org.gnome.test.gschema.xml
42 glib-compile-schemas --targetdir=. --schema-file=$<
44 CLEANFILES += Regress-1.0.gir Regress-1.0.typelib GIMarshallingTests-1.0.gir GIMarshallingTests-1.0.typelib gschemas.compiled
46 noinst_LTLIBRARIES += testhelper.la
48 testhelper_la_CFLAGS = -I$(top_srcdir)/gi/_gobject -I$(top_srcdir)/gi/_glib $(PYTHON_INCLUDES) $(GLIB_CFLAGS)
49 testhelper_la_LDFLAGS = -module -avoid-version
50 testhelper_la_LIBADD = $(GLIB_LIBS)
51 testhelper_la_SOURCES = \
57 # This is a hack to make sure a shared library is built
58 testhelper.la: $(testhelper_la_OBJECTS) $(testhelper_la_DEPENDENCIES)
59 $(LINK) -rpath $(pkgpyexecdir) $(testhelper_la_LDFLAGS) $(testhelper_la_OBJECTS) $(testhelper_la_LIBADD) $(LIBS)
63 test -L $@ || $(LN_S) .libs/$@ $@
66 all: $(LTLIBRARIES:.la=.so)
96 org.gnome.test.gschema.xml
98 EXTRA_DIST += $(TEST_FILES_STATIC) $(TEST_FILES_GI)
101 rm -f $(LTLIBRARIES:.la=.so) file.txt~
103 DBUS_LAUNCH=$(shell which dbus-launch)
104 RUN_TESTS_ENV_VARS= \
105 PYTHONPATH=$(top_builddir):$(top_builddir)/tests:$${PYTHONPATH:+:$$PYTHONPATH} \
106 LD_LIBRARY_PATH=$(builddir)/.libs:$$LD_LIBRARY_PATH \
107 GI_TYPELIB_PATH=$(builddir):$$GI_TYPELIB_PATH \
108 XDG_DATA_DIRS=$$XDG_DATA_DIRS:/usr/share \
109 TESTS_BUILDDIR=$(builddir)
110 RUN_TESTS_LAUNCH=$(RUN_TESTS_ENV_VARS) $(DBUS_LAUNCH) $(EXEC_NAME) $(PYTHON) $(srcdir)/runtests.py
112 check-local: $(LTLIBRARIES:.la=.so) Regress-1.0.typelib GIMarshallingTests-1.0.typelib gschemas.compiled
113 TEST_FILES="$(TEST_FILES_STATIC)" $(RUN_TESTS_LAUNCH)
114 TEST_FILES="$(TEST_FILES_GI)" $(RUN_TESTS_LAUNCH)
117 EXEC_NAME="gdb --args" $(MAKE) check
120 EXEC_NAME="valgrind --suppressions=python.supp" G_SLICE=always-malloc G_DEBUG=gc-friendly $(MAKE) check
122 -include $(top_srcdir)/git.mk