From 21315eb014eb908ce3472fa75917412e21fcea29 Mon Sep 17 00:00:00 2001
From: Gilles Dartiguelongue <eva@gentoo.org>
Date: Sun, 2 Nov 2014 12:06:39 +0100
Subject: [PATCH 2/2] Make unittest build on demand

Unittests need not be built when not run.
Also, solves a dependency problem where libqofsql would not be built
before sql_backend_test is linked.

https://bugs.gentoo.org/show_bug.cgi?id=197999
---
 lib/libsql/Makefile.am | 2 +-
 qof/test/Makefile.am   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/libsql/Makefile.am b/lib/libsql/Makefile.am
index b410689..c9534fb 100644
--- a/lib/libsql/Makefile.am
+++ b/lib/libsql/Makefile.am
@@ -21,7 +21,7 @@ libqofsql_la_LIBADD = ${GLIB_LIBS}
 qofsqlincludedir = ${pkgincludedir}
 qofsqlinclude_HEADERS = sql_parser.h
 
-noinst_PROGRAMS = sql_parse_test
+check_PROGRAMS = sql_parse_test
 
 EXTRA_DIST =       \
 	README          \
diff --git a/qof/test/Makefile.am b/qof/test/Makefile.am
index da7f28f..0760f45 100644
--- a/qof/test/Makefile.am
+++ b/qof/test/Makefile.am
@@ -65,7 +65,7 @@ test_sql_SOURCES = \
   test-stuff.c \
   test-sql.c
 
-noinst_PROGRAMS = \
+check_PROGRAMS = \
   test-book-merge \
   test-date \
   test-guid \
-- 
2.1.2

