[Pkg-gnupg-commit] [libgpg-error] 09/15: Add an option to disable tests
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Thu Jul 14 23:49:28 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository libgpg-error.
commit d57a16c3779eca84dedcf2423b26e41172cd5a96
Author: Yann E. MORIN <yann.morin.1998 at free.fr>
Date: Sun Jul 10 11:38:47 2016 +0200
Add an option to disable tests
* configure.ac: add an option to enable/disable building tests
* Makefile.am: conditionally build tests
--
On an embeded device, there is no reason to have the tests present in
a production release build. Add a configure-time option to disable
them.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
---
Makefile.am | 8 +++++++-
configure.ac | 5 +++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index baeba14..5abd97d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,7 +39,13 @@ else
doc =
endif
-SUBDIRS = m4 src $(doc) tests po $(lang_subdirs)
+if BUILD_TESTS
+tests = tests
+else
+tests =
+endif
+
+SUBDIRS = m4 src $(doc) $(tests) po $(lang_subdirs)
dist-hook: gen-ChangeLog
diff --git a/configure.ac b/configure.ac
index 682fd84..d19943d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -533,6 +533,11 @@ AC_ARG_ENABLE([doc], AC_HELP_STRING([--disable-doc],
build_doc=$enableval, build_doc=yes)
AM_CONDITIONAL([BUILD_DOC], [test "x$build_doc" != xno])
+build_tests=yes
+AC_ARG_ENABLE([tests], AC_HELP_STRING([--disable-tests],
+ [do not build the tests]),
+ build_tests=$enableval, build_tests=yes)
+AM_CONDITIONAL([BUILD_TESTS], [test "x$build_tests" != xno])
#
# Substitution
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libgpg-error.git
More information about the Pkg-gnupg-commit
mailing list