[gnome-keyring] Rework configure build options based on recent mailing list posts



commit f575afb81aad66d66cb969aab52e4180ce811014
Author: Stef Walter <stefw collabora co uk>
Date:   Mon Sep 26 15:22:49 2011 +0200

    Rework configure build options based on recent mailing list posts
    
     * --enable-strict to enable -Werror, fatal warnings and disable
       deprecations
     * --disable-debug to G_DISABLE_ASSERT
     * default debug for -g, WITH_DEBUG
     * --enable-debug to -OO

 HACKING                             |   19 ++++-
 Makefile.am                         |   13 +--
 configure.ac                        |  164 ++++++++++++++++-------------------
 daemon/control/Makefile.am          |    7 +--
 daemon/dbus/Makefile.am             |    8 +--
 daemon/dbus/gkd-dbus-secrets.c      |    2 +-
 daemon/dbus/gkd-dbus.c              |    2 +-
 daemon/gkd-main.c                   |   12 ++--
 daemon/gkd-pkcs11.c                 |    2 +-
 egg/Makefile.am                     |    8 +--
 gck/Makefile.am                     |   12 +--
 gcr/Makefile.am                     |   12 +--
 pkcs11/gkm/Makefile.am              |    8 +--
 pkcs11/gnome2-store/Makefile.am     |    8 +--
 pkcs11/roots-store/Makefile.am      |    8 +--
 pkcs11/secret-store/Makefile.am     |    9 +--
 pkcs11/ssh-store/Makefile.am        |    8 +--
 pkcs11/wrap-layer/Makefile.am       |    8 +--
 pkcs11/wrap-layer/tests/Makefile.am |    4 +-
 pkcs11/xdg-store/Makefile.am        |    8 +--
 ui/Makefile.am                      |   12 +--
 21 files changed, 124 insertions(+), 210 deletions(-)
---
diff --git a/HACKING b/HACKING
index 1932eee..947f889 100644
--- a/HACKING
+++ b/HACKING
@@ -1,7 +1,24 @@
 
-HACKING GNOME KEYRING 
+HACKING GNOME KEYRING
+
+BUILD OPTIONS
+---------------
+
+Build options for developers:
+
+  --enable-strict: Build with -Werror, disable deprecations, and fatal warnings
+
+  --enable-debug: Turn off compiler optimization
+  --disable-debug: Turn off all debug options and output.
+
+  --enable-coverage: Build coverage, use 'make coverage' for summary.
+
+
+PATCHES
+----------
 
 Patches should be submitted to bugzilla:
+
 http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-keyring
 
 The gnome-keyring mailing list is:
diff --git a/Makefile.am b/Makefile.am
index 57981f9..ed9db2d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -4,12 +4,6 @@ else
 PAM_DIR = 
 endif
 
-if WITH_TESTS
-TESTS_DIR = testing
-else
-TESTS_DIR = 
-endif
-
 SUBDIRS = \
 	. \
 	egg \
@@ -20,7 +14,7 @@ SUBDIRS = \
 	schema \
 	daemon \
 	tool \
-	$(TESTS_DIR) \
+	testing \
 	$(PAM_DIR) \
 	po \
 	docs
@@ -36,9 +30,8 @@ EXTRA_DIST = \
 
 DISTCHECK_CONFIGURE_FLAGS = \
 	--enable-gtk-doc \
-	--enable-tests=full \
-	--enable-debug=yes \
-	--disable-gcov \
+	--enable-strict \
+	--disable-coverage \
 	--disable-update-mime \
 	--with-pkcs11-modules=$(abs_srcdir)/$(top_distdir)/_inst/lib/
 
diff --git a/configure.ac b/configure.ac
index b785f65..ce56b89 100644
--- a/configure.ac
+++ b/configure.ac
@@ -480,37 +480,79 @@ fi
 AM_CONDITIONAL([WITH_CAPS], [test x"$with_libcap_ng" = x"yes"])
 libcapng_status="$with_libcap_ng"
 
+# ----------------------------------------------------------------------
+# selinux
+
+LIBSELINUX=""
+selinux_status="no"
+AC_ARG_ENABLE([selinux],
+        AC_HELP_STRING([--disable-selinux],[do not use SELinux]))
+if test "x$enable_selinux" != "xno"; then
+    AC_CHECK_LIB([selinux],[getfilecon],
+        [AC_CHECK_LIB([selinux],[setexeccon],
+            [AC_DEFINE([WITH_SELINUX], 1, [Defined if SE Linux support is compiled in])
+             LIBSELINUX="-lselinux"
+             selinux_status="yes"])
+        ])
+fi
+AC_SUBST(LIBSELINUX)
+AM_CONDITIONAL([HAVE_LIBSELINUX], [test ! -z "$LIBSELINUX"])
+
+# ----------------------------------------------------------------------
+# p11-tests
+
+AC_ARG_ENABLE(p11_tests,
+	AC_HELP_STRING([--disable-p11-tests],
+	[Build in p11-tests for testing PKCS#11 modules]))
+
+p11_tests_status="no"
+
+if test "$enable_p11_tests" != "no"; then
+	PKG_CHECK_MODULES(P11_TESTS, p11-tests >= 0.1,
+	                  p11_tests_status=yes, p11_tests_status=no)
+fi
+
+AM_CONDITIONAL(WITH_P11_TESTS, test "$p11_tests_status" = "yes")
+
+if test "$p11_tests_status" = "yes"; then
+	AC_DEFINE_UNQUOTED(WITH_P11_TESTS, 1, [Run p11-tests module testing])
+fi
+
+# ----------------------------------------------------------------------
+# mime-database
+
+AC_ARG_ENABLE(update-mime,
+	AC_HELP_STRING([--disable-update-mime],
+	[don't run update-mime-database utility (useful for packages) ]))
+AM_CONDITIONAL(WITH_UPDATE_MIME, test "$enable_update_mime" != "no")
+
 # --------------------------------------------------------------------
-# Debug mode
+# Compilation and linking options
 #
 
 AC_MSG_CHECKING([for debug mode])
 AC_ARG_ENABLE(debug,
-              AC_HELP_STRING([--enable-debug=no/yes/full],
+              AC_HELP_STRING([--enable-debug=no/default/yes],
               [Turn on or off debugging]))
 
 if test "$enable_debug" != "no"; then
 	AC_DEFINE_UNQUOTED(WITH_DEBUG, 1, [Print debug output])
 	AC_DEFINE_UNQUOTED(_DEBUG, 1, [In debug mode])
+	CFLAGS="$CFLAGS -g"
 fi
 
-if test "$enable_debug" = "full"; then
-	debug_status="full"
-	CFLAGS="$CFLAGS -g -O0 -Werror"
-	CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED"
-	CFLAGS="$CFLAGS -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
+if test "$enable_debug" = "yes"; then
+	debug_status="yes (-g, -O0, debug output, testable)"
+	CFLAGS="$CFLAGS -O0"
 elif test "$enable_debug" = "no"; then
-	debug_status="no"
+	debug_status="no (no debug output, not testable, G_DISABLE_ASSERT)"
 	AC_DEFINE_UNQUOTED(G_DISABLE_ASSERT, 1, [Disable glib assertions])
 else
-	debug_status="yes"
+	debug_status="default (-g, debug output, testable)"
 fi
 
 AC_MSG_RESULT($debug_status)
 
-# -------------------------------------------------------------------
-# More warnings
-
 AC_MSG_CHECKING(for more warnings)
 if test "$GCC" = "yes"; then
 	AC_MSG_RESULT(yes)
@@ -544,44 +586,39 @@ else
 	AC_MSG_RESULT(no)
 fi
 
-# --------------------------------------------------------------------
-# Tests and Unit Tests
-
-AC_ARG_ENABLE(tests,
-	    AC_HELP_STRING([--enable-tests=yes/no/full],
-	    [Build tests and testing tools. default: yes]))
+AC_ARG_ENABLE(strict, [
+               AS_HELP_STRING([--enable-strict], [Strict code compilation])
+             ])
 
-AC_MSG_CHECKING([build test tools, unit tests, and -Werror])
+AC_MSG_CHECKING([build strict])
 
-if test "$enable_tests" = "full"; then
-	tests_status="full"
-	CFLAGS="$CFLAGS -Werror"
+if test "$enable_strict" = "yes"; then
+	CFLAGS="$CFLAGS -Werror \
+		-DGTK_DISABLE_DEPRECATED \
+		-DGDK_DISABLE_DEPRECATED \
+		-DG_DISABLE_DEPRECATED \
+		-DGDK_PIXBUF_DISABLE_DEPRECATED"
 	TEST_MODE="thorough"
-	AC_DEFINE_UNQUOTED(WITH_TESTABLE, 1, [Build extra hooks for more testable code])
-elif test "$enable_tests" = "no"; then
-	tests_status="no"
+	AC_DEFINE_UNQUOTED(WITH_STRICT, 1, [More strict checks])
+	strict_status="yes (-Werror, thorough tests, fatals, no deprecations)"
 else
 	TEST_MODE="quick"
-	tests_status="yes"
+	strict_status="no (quick tests, non-fatal warnings)"
 fi
 
-AC_MSG_RESULT($tests_status)
+AC_MSG_RESULT($strict_status)
 AC_SUBST(TEST_MODE)
-AM_CONDITIONAL(WITH_TESTS, test "$enable_tests" != "no")
-
-# ----------------------------------------------------------------------
-# Coverage
 
 AC_MSG_CHECKING([whether to build with gcov testing])
-AC_ARG_ENABLE([gcov],
-		AS_HELP_STRING([--enable-gcov],
+AC_ARG_ENABLE([coverage],
+		AS_HELP_STRING([--enable-coverage],
 			[Whether to enable coverage testing ]),
 		[],
-		[enable_gcov=no])
+		[enable_coverage=no])
 
-AC_MSG_RESULT([$enable_gcov])
+AC_MSG_RESULT([$enable_coverage])
 
-if test "$enable_gcov" = "yes"; then
+if test "$enable_coverage" = "yes"; then
 	if test "$GCC" != "yes"; then
 		AC_MSG_ERROR(Coverage testing requires GCC)
 	fi
@@ -605,32 +642,11 @@ if test "$enable_gcov" = "yes"; then
 	LDFLAGS="$LDFLAGS -lgcov"
 fi
 
-AM_CONDITIONAL([WITH_COVERAGE], [test "$enable_gcov" = "yes"])
+AM_CONDITIONAL([WITH_COVERAGE], [test "$enable_coverage" = "yes"])
 AC_SUBST(LCOV)
 AC_SUBST(GCOV)
 AC_SUBST(GENHTML)
 
-# ----------------------------------------------------------------------
-# selinux
-
-LIBSELINUX=""
-selinux_status="no"
-AC_ARG_ENABLE([selinux],
-        AC_HELP_STRING([--disable-selinux],[do not use SELinux]))
-if test "x$enable_selinux" != "xno"; then
-    AC_CHECK_LIB([selinux],[getfilecon],
-        [AC_CHECK_LIB([selinux],[setexeccon],
-            [AC_DEFINE([WITH_SELINUX], 1, [Defined if SE Linux support is compiled in])
-             LIBSELINUX="-lselinux"
-             selinux_status="yes"])
-        ])
-fi
-AC_SUBST(LIBSELINUX)
-AM_CONDITIONAL([HAVE_LIBSELINUX], [test ! -z "$LIBSELINUX"])
-
-# ----------------------------------------------------------------------
-# Valgrind
-
 AC_ARG_ENABLE(valgrind,
 	AC_HELP_STRING([--enable-valgrind],
 	[Run gnome-keyring-daemon using valgrind]))
@@ -678,34 +694,6 @@ else
 fi
 
 # ----------------------------------------------------------------------
-# p11-tests
-
-AC_ARG_ENABLE(p11_tests,
-	AC_HELP_STRING([--disable-p11-tests],
-	[Build in p11-tests for testing PKCS#11 modules]))
-
-p11_tests_status="no"
-
-if test "$enable_p11_tests" != "no"; then
-	PKG_CHECK_MODULES(P11_TESTS, p11-tests >= 0.1,
-	                  p11_tests_status=yes, p11_tests_status=no)
-fi
-
-AM_CONDITIONAL(WITH_P11_TESTS, test "$p11_tests_status" = "yes")
-
-if test "$p11_tests_status" = "yes"; then
-	AC_DEFINE_UNQUOTED(WITH_P11_TESTS, 1, [Run p11-tests module testing])
-fi
-
-# ----------------------------------------------------------------------
-# mime-database
-
-AC_ARG_ENABLE(update-mime,
-	AC_HELP_STRING([--disable-update-mime],
-	[don't run update-mime-database utility (useful for packages) ]))
-AM_CONDITIONAL(WITH_UPDATE_MIME, test "$enable_update_mime" != "no")
-
-# ----------------------------------------------------------------------
 
 GCK_LT_RELEASE=$GCK_CURRENT:$GCK_REVISION:$GCK_AGE
 AC_SUBST(GCK_LT_RELEASE)
@@ -820,8 +808,8 @@ echo "  Root Certificates:    $root_status"
 echo
 echo "BUILD"
 echo "  Debug Build:          $debug_status"
+echo "  Strict Compilation:   $strict_status"
 echo "  Valgrind:             $valgrind_status"
 echo "  PKCS#11 Tests         $p11_tests_status"
-echo "  Tests, -Werror:       $tests_status"
-echo "  Test Coverage:        $enable_gcov"
+echo "  Test Coverage:        $enable_coverage"
 echo
diff --git a/daemon/control/Makefile.am b/daemon/control/Makefile.am
index 866f399..6f4f70c 100644
--- a/daemon/control/Makefile.am
+++ b/daemon/control/Makefile.am
@@ -1,10 +1,5 @@
-if WITH_TESTS
-TESTS_DIR = tests
-else
-TESTS_DIR =
-endif
 
-SUBDIRS = . $(TESTS_DIR)
+SUBDIRS = . tests
 
 INCLUDES= \
 	-DPREFIX=\""$(prefix)"\" \
diff --git a/daemon/dbus/Makefile.am b/daemon/dbus/Makefile.am
index 04b2783..3f1dc8c 100644
--- a/daemon/dbus/Makefile.am
+++ b/daemon/dbus/Makefile.am
@@ -39,10 +39,4 @@ libgkd_dbus_la_LIBADD = \
 
 # -------------------------------------------------------------------
 
-if WITH_TESTS
-TESTS_DIR = tests
-else
-TESTS_DIR =
-endif
-
-SUBDIRS = . $(TESTS_DIR)
+SUBDIRS = . tests
diff --git a/daemon/dbus/gkd-dbus-secrets.c b/daemon/dbus/gkd-dbus-secrets.c
index 3a1c727..c9323aa 100644
--- a/daemon/dbus/gkd-dbus-secrets.c
+++ b/daemon/dbus/gkd-dbus-secrets.c
@@ -71,7 +71,7 @@ gkd_dbus_secrets_startup (void)
 
 	g_return_val_if_fail (dbus_conn, FALSE);
 
-#ifdef WITH_TESTABLE
+#ifdef WITH_DEBUG
 	service = g_getenv ("GNOME_KEYRING_TEST_SERVICE");
 	if (service && service[0])
 		flags = DBUS_NAME_FLAG_ALLOW_REPLACEMENT | DBUS_NAME_FLAG_REPLACE_EXISTING;
diff --git a/daemon/dbus/gkd-dbus.c b/daemon/dbus/gkd-dbus.c
index 551cfe3..92daafb 100644
--- a/daemon/dbus/gkd-dbus.c
+++ b/daemon/dbus/gkd-dbus.c
@@ -184,7 +184,7 @@ gkd_dbus_singleton_acquire (gboolean *acquired)
 	/* Try and grab our name */
 	if (!acquired_asked) {
 
-#ifdef WITH_TESTABLE
+#ifdef WITH_DEBUG
 		service = g_getenv ("GNOME_KEYRING_TEST_SERVICE");
 		if (service && service[0])
 			flags = DBUS_NAME_FLAG_ALLOW_REPLACEMENT | DBUS_NAME_FLAG_REPLACE_EXISTING;
diff --git a/daemon/gkd-main.c b/daemon/gkd-main.c
index 0fe17bc..0b9294c 100644
--- a/daemon/gkd-main.c
+++ b/daemon/gkd-main.c
@@ -324,7 +324,7 @@ prepare_logging ()
 	g_set_printerr_handler (printerr_handler);
 }
 
-#ifdef WITH_TESTABLE
+#ifdef WITH_DEBUG
 
 static void
 dump_diagnostics (void)
@@ -374,7 +374,7 @@ dump_diagnostics (void)
 	free (records);
 }
 
-#endif /* WITH_TESTABLE */
+#endif /* WITH_DEBUG */
 
 /* -----------------------------------------------------------------------------
  * SIGNALS
@@ -398,9 +398,9 @@ signal_thread (gpointer user_data)
 
 		switch (sig) {
 		case SIGUSR1:
-#ifdef WITH_TESTABLE
+#ifdef WITH_DEBUG
 			dump_diagnostics ();
-#endif /* WITH_TESTABLE */
+#endif /* WITH_DEBUG */
 			break;
 		case SIGPIPE:
 			/* Ignore */
@@ -874,7 +874,7 @@ main (int argc, char *argv[])
 	 */
 	gkd_capability_obtain_capability_and_drop_privileges ();
 
-#ifdef WITH_TESTABLE
+#ifdef WITH_STRICT
 	g_setenv ("DBUS_FATAL_WARNINGS", "1", FALSE);
 	if (!g_getenv ("G_DEBUG"))
 		g_log_set_always_fatal (G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING);
@@ -905,7 +905,7 @@ main (int argc, char *argv[])
 	if (run_version) {
 		g_print ("gnome-keyring-daemon: %s\n", VERSION);
 		g_print ("testing: %s\n",
-#ifdef WITH_TESTABLE
+#ifdef WITH_DEBUG
 		         "enabled");
 #else
 		         "disabled");
diff --git a/daemon/gkd-pkcs11.c b/daemon/gkd-pkcs11.c
index aefe4c1..9cc7717 100644
--- a/daemon/gkd-pkcs11.c
+++ b/daemon/gkd-pkcs11.c
@@ -105,7 +105,7 @@ gkd_pkcs11_initialize (void)
 	memset (&init_args, 0, sizeof (init_args));
 	init_args.flags = CKF_OS_LOCKING_OK;
 
-#if WITH_TESTABLE
+#if WITH_DEBUG
 	{
 		const gchar *path = g_getenv ("GNOME_KEYRING_TEST_PATH");
 		if (path && path[0])
diff --git a/egg/Makefile.am b/egg/Makefile.am
index 00799e3..eb2268a 100644
--- a/egg/Makefile.am
+++ b/egg/Makefile.am
@@ -134,10 +134,4 @@ libegg_test_la_LIBS = \
 
 # -------------------------------------------------------------------
 
-if WITH_TESTS
-TESTS_DIR = tests
-else
-TESTS_DIR = 
-endif
-
-SUBDIRS = . $(TESTS_DIR)
+SUBDIRS = . tests
diff --git a/gck/Makefile.am b/gck/Makefile.am
index 0ab15c1..04807ee 100644
--- a/gck/Makefile.am
+++ b/gck/Makefile.am
@@ -1,13 +1,5 @@
 
-if WITH_TESTS
-TESTS_DIR = tests
-TESTABLE_LIB = libgck-testable.la
-else
-TESTS_DIR =
-TESTABLE_LIB =
-endif
-
-SUBDIRS = . $(TESTS_DIR)
+SUBDIRS = . tests
 
 incdir = $(includedir)/gck- GCK_MAJOR@/gck
 
@@ -60,7 +52,7 @@ libgck_ GCK_MAJOR@_la_LIBADD = \
 	$(GIO_LIBS) \
 	$(GLIB_LIBS)
 
-noinst_LTLIBRARIES = $(TESTABLE_LIB)
+noinst_LTLIBRARIES = libgck-testable.la
 libgck_testable_la_SOURCES = \
 	gck-mock.c \
 	gck-mock.h \
diff --git a/gcr/Makefile.am b/gcr/Makefile.am
index f3db2a0..28a51cb 100644
--- a/gcr/Makefile.am
+++ b/gcr/Makefile.am
@@ -1,12 +1,4 @@
-if WITH_TESTS
-TESTS_DIR = tests
-TESTABLE_LIB = libgcr-testable.la
-else
-TESTS_DIR =
-TESTABLE_LIB =
-endif
-
-SUBDIRS = . icons $(TESTS_DIR)
+SUBDIRS = . icons tests
 
 # ------------------------------------------------------------------
 # UI BUILDER
@@ -184,7 +176,7 @@ libgcr_ GCR_MAJOR@_la_LIBADD = \
 	$(libgcr_base_ GCR_MAJOR@_la_LIBADD) \
 	$(builddir)/libgcr-base-$(GCR_MAJOR).la
 
-noinst_LTLIBRARIES = $(TESTABLE_LIB)
+noinst_LTLIBRARIES = libgcr-testable.la
 libgcr_testable_la_SOURCES =
 libgcr_testable_la_LIBADD = \
 	$(libgcr_base_ GCR_MAJOR@_la_OBJECTS) \
diff --git a/pkcs11/gkm/Makefile.am b/pkcs11/gkm/Makefile.am
index bf6a1c8..b413850 100644
--- a/pkcs11/gkm/Makefile.am
+++ b/pkcs11/gkm/Makefile.am
@@ -95,10 +95,4 @@ EXTRA_DIST = \
 
 # -------------------------------------------------------------------------------
 
-if WITH_TESTS
-TESTS_DIR = tests
-else
-TESTS_DIR =
-endif
-
-SUBDIRS = . $(TESTS_DIR)
+SUBDIRS = . tests
diff --git a/pkcs11/gnome2-store/Makefile.am b/pkcs11/gnome2-store/Makefile.am
index 8f132a1..fd874f3 100644
--- a/pkcs11/gnome2-store/Makefile.am
+++ b/pkcs11/gnome2-store/Makefile.am
@@ -48,10 +48,4 @@ gkm_gnome2_store_standalone_la_LIBADD = \
 
 # -------------------------------------------------------------------------------
 
-if WITH_TESTS
-TESTS_DIR = tests
-else
-TESTS_DIR =
-endif
-
-SUBDIRS = . $(TESTS_DIR)
+SUBDIRS = . tests
diff --git a/pkcs11/roots-store/Makefile.am b/pkcs11/roots-store/Makefile.am
index 034a463..ff391e8 100644
--- a/pkcs11/roots-store/Makefile.am
+++ b/pkcs11/roots-store/Makefile.am
@@ -49,10 +49,4 @@ gkm_roots_store_standalone_la_LIBADD = \
 
 # -------------------------------------------------------------------------------
 
-if WITH_TESTS
-TESTS_DIR = tests
-else
-TESTS_DIR =
-endif
-
-SUBDIRS = . $(TESTS_DIR)
+SUBDIRS = . tests
diff --git a/pkcs11/secret-store/Makefile.am b/pkcs11/secret-store/Makefile.am
index 3bb3e89..c0dbbbb 100644
--- a/pkcs11/secret-store/Makefile.am
+++ b/pkcs11/secret-store/Makefile.am
@@ -53,11 +53,4 @@ gkm_secret_store_standalone_la_LIBADD = \
 
 # -------------------------------------------------------------------------------
 
-
-if WITH_TESTS
-TESTS_DIR = tests
-else
-TESTS_DIR =
-endif
-
-SUBDIRS = . $(TESTS_DIR)
+SUBDIRS = . tests
diff --git a/pkcs11/ssh-store/Makefile.am b/pkcs11/ssh-store/Makefile.am
index 811c8d4..d221d49 100644
--- a/pkcs11/ssh-store/Makefile.am
+++ b/pkcs11/ssh-store/Makefile.am
@@ -49,10 +49,4 @@ gkm_ssh_store_standalone_la_LIBADD = \
 
 # -------------------------------------------------------------------------------
 
-if WITH_TESTS
-TESTS_DIR = tests
-else
-TESTS_DIR =
-endif
-
-SUBDIRS = . $(TESTS_DIR)
+SUBDIRS = . tests
diff --git a/pkcs11/wrap-layer/Makefile.am b/pkcs11/wrap-layer/Makefile.am
index b12be4b..0113cf3 100644
--- a/pkcs11/wrap-layer/Makefile.am
+++ b/pkcs11/wrap-layer/Makefile.am
@@ -26,10 +26,4 @@ libgkm_wrap_layer_la_CFLAGS = \
 
 # ------------------------------------------------------------------------------
 
-if WITH_TESTS
-TESTS_DIR = tests
-else
-TESTS_DIR =
-endif
-
-SUBDIRS = . $(TESTS_DIR)
\ No newline at end of file
+SUBDIRS = . tests
diff --git a/pkcs11/wrap-layer/tests/Makefile.am b/pkcs11/wrap-layer/tests/Makefile.am
index 152905d..9597ffd 100644
--- a/pkcs11/wrap-layer/tests/Makefile.am
+++ b/pkcs11/wrap-layer/tests/Makefile.am
@@ -4,8 +4,8 @@ INCLUDES = \
 	-I$(top_srcdir) \
 	-I$(top_srcdir)/pkcs11 \
 	-DSRCDIR="\"@abs_srcdir \"" \
-	$(GLIB_CFLAGS) \
-	-DWITH_TESTABLE
+	-DWITH_TESTABLE \
+	$(GLIB_CFLAGS)
 
 LDADD = \
 	$(top_builddir)/pkcs11/wrap-layer/libgkm-wrap-layer.la \
diff --git a/pkcs11/xdg-store/Makefile.am b/pkcs11/xdg-store/Makefile.am
index 4bdce1f..569ae65 100644
--- a/pkcs11/xdg-store/Makefile.am
+++ b/pkcs11/xdg-store/Makefile.am
@@ -57,10 +57,4 @@ gkm_xdg_store_standalone_la_LIBADD = \
 
 # -------------------------------------------------------------------------------
 
-if WITH_TESTS
-TESTS_DIR = tests
-else
-TESTS_DIR =
-endif
-
-SUBDIRS = . $(TESTS_DIR)
+SUBDIRS = . tests
diff --git a/ui/Makefile.am b/ui/Makefile.am
index 54dc833..f6a89c4 100644
--- a/ui/Makefile.am
+++ b/ui/Makefile.am
@@ -1,13 +1,5 @@
 
-if WITH_TESTS
-TESTS_DIR = tests
-TESTABLE_LIB = libgku-prompt-testable.la
-else
-TESTS_DIR =
-TESTABLE_LIB =
-endif
-
-SUBDIRS = . $(TESTS_DIR)
+SUBDIRS = . tests
 
 INCLUDES= \
 	-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
@@ -29,7 +21,7 @@ ui_DATA = \
 # ------------------------------------------------------------------
 # DAEMON CODE
 
-noinst_LTLIBRARIES = libgku-prompt.la $(TESTABLE_LIB)
+noinst_LTLIBRARIES = libgku-prompt.la libgku-prompt-testable.la
 
 BUILT_SOURCES = \
 	gku-prompt-marshal.c gku-prompt-marshal.h



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]