summaryrefslogtreecommitdiff
path: root/tests/scanner/Makefile.am
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gmail.com>2011-08-22 02:49:51 -0400
committerColin Walters <walters@verbum.org>2011-08-23 10:15:29 -0400
commit3a308bb438246f7d6e87ebe2f6efeb1795fdcd1e (patch)
treec8fabd232cb6cdaadd3fcf974e0f3b66629cc148 /tests/scanner/Makefile.am
parent0bc07516cf964d42719844a29907ec20ad433652 (diff)
downloadgobject-introspection-3a308bb438246f7d6e87ebe2f6efeb1795fdcd1e.tar.gz
tests: build tests only on make check
Use automake's check_ prefix and avoid putting anything nontrivial in BUILT_SOURCES so that tests are build only on make check. The dummy -rpath in AM_LDFLAGS in tests/scanner/Makefile.am is needed to force libtool to build shared libraries for check_LTLIBRARIESS targets (automake builds check_LTLIBRARIES as static by default); see http://lists.gnu.org/archive/html/automake/2005-10/msg00107.html https://bugzilla.gnome.org/show_bug.cgi?id=657066
Diffstat (limited to 'tests/scanner/Makefile.am')
-rw-r--r--tests/scanner/Makefile.am16
1 files changed, 6 insertions, 10 deletions
diff --git a/tests/scanner/Makefile.am b/tests/scanner/Makefile.am
index 6b78ee75..fc2e260a 100644
--- a/tests/scanner/Makefile.am
+++ b/tests/scanner/Makefile.am
@@ -3,24 +3,21 @@ include $(top_srcdir)/Makefile.introspection
INTROSPECTION_SCANNER_ARGS += --warn-all --warn-error -I.
-# We need to build a shared library, which can be dlopened
-# it does not work with noinst_LTLIBRARIES
-testlib_LTLIBRARIES = \
+check_LTLIBRARIES = \
libannotation.la \
libtestinherit.la \
libfoo.la \
libutility.la \
libgtkfrob.la
if HAVE_CAIRO
-testlib_LTLIBRARIES += libregress.la
+check_LTLIBRARIES += libregress.la
endif
-testlibdir = $(prefix)/unused
-install-testlibLTLIBRARIES: # prevent it from being installed
-
AM_CPPFLAGS = -I$(top_srcdir)/girepository
AM_CFLAGS = $(GIO_CFLAGS) $(GOBJECT_CFLAGS) $(GTHREAD_CFLAGS)
-AM_LDFLAGS = -avoid-version
+# -rpath needed to force libtool to build a shared library for a check_LTLIBRARIES
+# target. See http://lists.gnu.org/archive/html/automake/2005-10/msg00107.html
+AM_LDFLAGS = -rpath /unused -avoid-version
LIBS = $(GOBJECT_LIBS) $(GTHREAD_LIBS)
libannotation_la_SOURCES = $(srcdir)/annotation.c $(srcdir)/annotation.h
@@ -49,7 +46,6 @@ CHECKGIRS = $(GIRS:.gir=.gir.check)
EXPECTEDGIRS = $(GIRS:.gir=-expected.gir)
INTROSPECTION_GIRS = $(GIRS)
CLEANFILES = $(TYPELIBS) $(GIRS)
-BUILT_SOURCES = $(TYPELIBS) $(GIRS)
EXTRA_DIST = $(EXPECTEDGIRS)
Regress-1.0.gir: $(top_builddir)/Gio-2.0.gir libregress.la
@@ -102,7 +98,7 @@ GtkFrob_1_0_gir_FILES = $(libgtkfrob_la_SOURCES)
GtkFrob_1_0_gir_SCANNERFLAGS = --identifier-prefix=Gtk --symbol-prefix=gtk_frob
GIRS += GtkFrob-1.0.gir
-noinst_PROGRAMS = barapp
+check_PROGRAMS = barapp
barapp_SOURCES = $(srcdir)/barapp.c $(srcdir)/barapp.h
barapp_LDADD = $(top_builddir)/libgirepository-1.0.la