[libosinfo PATCH 1/3] build: fix disabling of tests

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

 



Actually use the result of the configure switch --enable-tests, enabling
or disabling the tests accordingly.

Signed-off-by: Pino Toscano <ptoscano@xxxxxxxxxx>
---
 Makefile.am  | 6 +++++-
 configure.ac | 2 ++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index c333d26..bc6f7fa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,9 @@
 
-SUBDIRS = osinfo tests tools docs po examples
+SUBDIRS = osinfo tools docs po examples
+
+if ENABLE_TESTS
+SUBDIRS += tests
+endif
 
 INTLTOOL_FILES = \
 	intltool-extract.in \
diff --git a/configure.ac b/configure.ac
index b3dab09..cba5268 100644
--- a/configure.ac
+++ b/configure.ac
@@ -63,6 +63,8 @@ if test "x$enable_tests" != "xno" ; then
   PKG_CHECK_MODULES([CHECK], [check])
 fi
 
+AM_CONDITIONAL([ENABLE_TESTS],[test "x$enable_tests" = "xyes"])
+
 LIBOSINFO_MAJOR_VERSION=`echo $VERSION | awk -F. '{print $1}'`
 LIBOSINFO_MINOR_VERSION=`echo $VERSION | awk -F. '{print $2}'`
 LIBOSINFO_MICRO_VERSION=`echo $VERSION | awk -F. '{print $3}'`
-- 
2.13.6

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux