From e2e1ba7fc7bd867100a9cc36adbf487b17edfa7e Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Fri, 4 Aug 2017 00:47:56 +0300 Subject: [PATCH] Do not install documentation if configure --disable-docs (new option) * configure.ac (docs): New AC_ARG_ENABLE. * configure.ac (ENABLE_DOCS): New AM_CONDITIONAL. * doc/doc.am (dist_doc_DATA): Define only if ENABLE_DOCS. --- configure.ac | 5 +++++ doc/doc.am | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 8190cef1..5826eebe 100644 --- a/configure.ac +++ b/configure.ac @@ -965,6 +965,11 @@ if test "$enable_gcov" = "yes"; then CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/-O\(1\|2\|3\|4\|s\|fast\)\?//g'` fi +AC_ARG_ENABLE(docs, + [AC_HELP_STRING([--disable-docs], + [Do not build and install documentation])]) +AM_CONDITIONAL(ENABLE_DOCS, test x$enable_docs != xno) + # Atomic Ops # ---------- diff --git a/doc/doc.am b/doc/doc.am index 73197ac9..1eec9f90 100644 --- a/doc/doc.am +++ b/doc/doc.am @@ -11,7 +11,7 @@ ## Process this file with automake to produce Makefile.in. # installed documentation -# +if ENABLE_DOCS dist_doc_DATA = \ AUTHORS \ README.md \ @@ -47,3 +47,4 @@ dist_doc_DATA = \ doc/scale.md \ doc/simple_example.md \ doc/tree.md +endif -- 2.40.0