From ebe48b8c778dbd4087b9fd8b56f3f0fcab168805 Mon Sep 17 00:00:00 2001 From: "Alan M. Carroll" Date: Wed, 30 Nov 2016 13:50:35 -0600 Subject: [PATCH] Doc: Make building docs an active configuration option. --- Makefile.am | 5 ++++- ci/jenkins/bin/docs.sh | 2 +- configure.ac | 13 +++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Makefile.am b/Makefile.am index 12de2d16ac6..f1a87478cf5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,7 +29,10 @@ export CCACHE_BASEDIR # proxy/api/ts has to be built first, since so much of libraries and "core # depends on the generates ts/ts.h include file. -SUBDIRS = proxy/api/ts iocore lib proxy/hdrs proxy/shared mgmt proxy cmd plugins tools example rc doc +SUBDIRS = proxy/api/ts iocore lib proxy/hdrs proxy/shared mgmt proxy cmd plugins tools example rc +if BUILD_DOCS +SUBDIRS += doc +endif DIST_BUILD_USER=`id -nu` diff --git a/ci/jenkins/bin/docs.sh b/ci/jenkins/bin/docs.sh index 6754040a8c8..f5b2a17f2ca 100644 --- a/ci/jenkins/bin/docs.sh +++ b/ci/jenkins/bin/docs.sh @@ -22,7 +22,7 @@ test ! -z "${WORKSPACE}" && cd "${WORKSPACE}/src" # This avoids redoing the configure on every doc build, which is somewhat annoying [ ! -f configure ] && autoreconf -fi -[ ! -f config.nice ] && ./configure +[ ! -f config.nice ] && ./configure --enable-docs cd doc diff --git a/configure.ac b/configure.ac index d9c51aab42c..f906135fd15 100644 --- a/configure.ac +++ b/configure.ac @@ -247,6 +247,19 @@ AC_MSG_RESULT([$enable_tests]) TS_ARG_ENABLE_VAR([has], [tests]) AM_CONDITIONAL([BUILD_TESTS], [test 0 -ne $has_tests]) +# +# Build documentation? +# + +AC_MSG_CHECKING([whether to build documentation]) +AC_ARG_ENABLE([docs], + [AS_HELP_STRING([--enable-docs],[enable documentation building])], + [], + [enable_doc_build=no] +) +AC_MSG_RESULT([$enable_doc_build]) +AM_CONDITIONAL([BUILD_DOCS], [test "xyes" = "x$enable_doc_build"]) + # # Remote Coverity Prevent commit #