[Libosinfo] [libosinfo PATCH 1/3] build: fix disabling of tests
Pino Toscano
ptoscano at redhat.com
Tue Oct 17 15:23:31 UTC 2017
Actually use the result of the configure switch --enable-tests, enabling
or disabling the tests accordingly.
Signed-off-by: Pino Toscano <ptoscano at redhat.com>
---
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
More information about the Libosinfo
mailing list