From: Ivan Maidanski Date: Thu, 3 Aug 2017 21:18:34 +0000 (+0300) Subject: Do not install documentation if configure --disable-docs (new option) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d2def0829e6c1a5aa8fff28c17c970e09fdc2897;p=libatomic_ops Do not install documentation if configure --disable-docs (new option) Issue #28 (libatomic_ops). * Makefile.am (dist_doc_DATA): Define only if ENABLE_DOCS. * doc/Makefile.am (dist_doc_DATA): Likewise. * configure.ac (docs): New AC_ARG_ENABLE. * configure.ac (ENABLE_DOCS): New AM_CONDITIONAL. --- diff --git a/Makefile.am b/Makefile.am index 657c898..a8f4ac9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,7 +6,9 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = pkgconfig/atomic_ops.pc noinst_DATA = pkgconfig/atomic_ops-uninstalled.pc +if ENABLE_DOCS dist_doc_DATA = COPYING README.md +endif EXTRA_DIST = autogen.sh diff --git a/configure.ac b/configure.ac index e98c478..b15a66e 100644 --- a/configure.ac +++ b/configure.ac @@ -125,6 +125,11 @@ if test "$enable_gcov" = "yes"; then CFLAGS=`echo "$CFLAGS" | 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) + AC_SUBST(PICFLAG) AC_SUBST(DEFS) diff --git a/doc/Makefile.am b/doc/Makefile.am index 66af2bd..571b52b 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,4 +1,7 @@ # installed documentation # + +if ENABLE_DOCS dist_doc_DATA = LICENSING.txt README_details.txt README_stack.txt \ README_malloc.txt README_win32.txt +endif