From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2201) id 053583858006; Mon, 20 Dec 2021 14:02:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 053583858006 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Jon TURNEY To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: Conditionally build documentation X-Act-Checkin: newlib-cygwin X-Git-Author: Jon Turney X-Git-Refname: refs/heads/master X-Git-Oldrev: 80f4b7d5456ea17d64998805fb3d64db091201fc X-Git-Newrev: f4a26ececa180cec70c41b6dd2082ff730f92065 Message-Id: <20211220140222.053583858006@sourceware.org> Date: Mon, 20 Dec 2021 14:02:22 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Dec 2021 14:02:22 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=f4a26ececa180cec70c41b6dd2082ff730f92065 commit f4a26ececa180cec70c41b6dd2082ff730f92065 Author: Jon Turney Date: Tue Dec 7 14:05:34 2021 +0000 Cygwin: Conditionally build documentation Add a configure option '--disable-doc' to disable building of the documentation by the 'all' target. Check for the required tools at configure time, and require them if building documentation is enabled. Even if building the documentation was diabled with '--disable-doc', 'make -C doc' at the top-level can still make the documentation, if the documentation tools were found. If the tools were not found, 'missing' is used to issue a warning about that. Update instructions for building Cygwin appropriately. (Building documentation remains the default to increase the chances of noticing when building the documentation is broken.) Diff: --- winsup/Makefile.am | 6 +++++- winsup/configure.ac | 25 ++++++++++++++++++++++++- winsup/doc/Makefile.am | 2 +- winsup/doc/faq-programming.xml | 14 +++++++++----- 4 files changed, 39 insertions(+), 8 deletions(-) diff --git a/winsup/Makefile.am b/winsup/Makefile.am index 067f74688..9efdd4cb1 100644 --- a/winsup/Makefile.am +++ b/winsup/Makefile.am @@ -14,6 +14,10 @@ cygdoc_DATA = \ CYGWIN_LICENSE \ COPYING -SUBDIRS = cygwin cygserver doc utils testsuite +SUBDIRS = cygwin cygserver utils testsuite + +if BUILD_DOC +SUBDIRS += doc +endif cygserver utils testsuite: cygwin diff --git a/winsup/configure.ac b/winsup/configure.ac index cf1128b37..4ae20509a 100644 --- a/winsup/configure.ac +++ b/winsup/configure.ac @@ -88,7 +88,30 @@ AC_SUBST(TLSOFFSETS_H) AM_CONDITIONAL(TARGET_X86_64, [test $target_cpu = "x86_64"]) -AC_CHECK_PROGS([DOCBOOK2XTEXI], [docbook2x-texi db2x_docbook2texi], [true]) +AC_ARG_ENABLE(doc, + [AS_HELP_STRING([--enable-doc], [Build documentation])],, + enable_doc=yes) +AM_CONDITIONAL(BUILD_DOC, [test $enable_doc != "no"]) + +AC_CHECK_PROGS([DOCBOOK2XTEXI], [docbook2x-texi db2x_docbook2texi]) +if test -z "$DOCBOOK2XTEXI" ; then + if test "x$enable_doc" != "xno"; then + AC_MSG_ERROR([docbook2texi is required to build documentation]) + else + unset DOCBOOK2XTEXI + AM_MISSING_PROG([DOCBOOK2XTEXI], [docbook2texi]) + fi +fi + +AC_CHECK_PROGS([XMLTO], [xmlto]) +if test -z "$XMLTO"; then + if test "x$enable_doc" != "xno"; then + AC_MSG_ERROR([xmlto is required to build documentation]) + else + unset XMLTO + AM_MISSING_PROG([XMLTO], [xmlto]) + fi +fi if test "x$with_cross_bootstrap" != "xyes"; then AC_CHECK_PROGS(MINGW_CXX, ${target_cpu}-w64-mingw32-g++) diff --git a/winsup/doc/Makefile.am b/winsup/doc/Makefile.am index 534d67480..5164c6e0a 100644 --- a/winsup/doc/Makefile.am +++ b/winsup/doc/Makefile.am @@ -16,7 +16,7 @@ doc_DATA = \ htmldir = $(datarootdir)/doc -XMLTO=xmlto --skip-validation --with-dblatex +XMLTO=@XMLTO@ --skip-validation --with-dblatex DOCBOOK2XTEXI=@DOCBOOK2XTEXI@ --xinclude --info --utf8trans-map=charmap -include Makefile.dep diff --git a/winsup/doc/faq-programming.xml b/winsup/doc/faq-programming.xml index 26fcfe921..46dd23ab8 100644 --- a/winsup/doc/faq-programming.xml +++ b/winsup/doc/faq-programming.xml @@ -689,12 +689,16 @@ Building for 32-bit Cygwin also requires Building for 64-bit Cygwin also requires mingw64-x86_64-gcc-g++ and mingw64-x86_64-zlib. + + -Normally, building ignores any errors in building the documentation, -which requires the dblatex, docbook2X, -docbook-xml45, docbook-xsl, and -xmlto packages. For more information on building the -documentation, see the README included in the cygwin-doc package. + + +Building the documentation also requires the dblatex, +docbook2X, docbook-xml45, +docbook-xsl, and xmlto packages. Building +the documentation can be disabled with the --disable-doc +option to configure. Next, check out the Cygwin sources from the