From 754a987f6df59e2ba0e69aada65ae4aaf593c148 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 15 Dec 2014 11:44:20 +0100 Subject: Add configure option --disable-doc * Makefile.am (doc) [!BUILD_DOC]: Do not recurse into doc/. * configure.ac (BUILD_DOC): New am_conditional and new option. -- We have this option already for GnuPG and should use it for all projects. Embedded platforms usually do not require documentation and being able to disable the building avoids a lot of build dependencies. Suggested-by: Hans-Christoph Steiner --- Makefile.am | 8 +++++++- configure.ac | 11 +++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index c6edd12..42cd0c4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -33,7 +33,13 @@ else lang_subdirs = endif -SUBDIRS = m4 src doc tests po $(lang_subdirs) +if BUILD_DOC +doc = doc +else +doc = +endif + +SUBDIRS = m4 src $(doc) tests po $(lang_subdirs) dist-hook: gen-ChangeLog diff --git a/configure.ac b/configure.ac index 9683c81..27fda63 100644 --- a/configure.ac +++ b/configure.ac @@ -508,10 +508,17 @@ AC_DEFINE_UNQUOTED(BUILD_TIMESTAMP, "$BUILD_TIMESTAMP", -AC_ARG_ENABLE(languages, -[ --disable-languages do not build support for other languages than C]) +AC_ARG_ENABLE(languages, AC_HELP_STRING([--disable-languages], + [do not build support for other languages than C])) AM_CONDITIONAL([LANGUAGES_SOME], [test "x$enable_languages" != xno]) +build_doc=yes +AC_ARG_ENABLE([doc], AC_HELP_STRING([--disable-doc], + [do not build the documentation]), + build_doc=$enableval, build_doc=yes) +AM_CONDITIONAL([BUILD_DOC], [test "x$enable_languages" != xno]) + + # # Substitution # -- cgit v1.2.3