From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sa-prd-fep-043.btinternet.com (mailomta19-sa.btinternet.com [213.120.69.25]) by sourceware.org (Postfix) with ESMTPS id D981C3858D3C for ; Wed, 8 Dec 2021 15:04:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D981C3858D3C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dronecode.org.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=dronecode.org.uk Received: from sa-prd-rgout-001.btmx-prd.synchronoss.net ([10.2.38.4]) by sa-prd-fep-043.btinternet.com with ESMTP id <20211208150425.JJQA18908.sa-prd-fep-043.btinternet.com@sa-prd-rgout-001.btmx-prd.synchronoss.net>; Wed, 8 Dec 2021 15:04:25 +0000 Authentication-Results: btinternet.com; auth=pass (LOGIN) smtp.auth=jonturney@btinternet.com; bimi=skipped X-SNCR-Rigid: 613006A90E368CA8 X-Originating-IP: [81.129.146.209] X-OWM-Source-IP: 81.129.146.209 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvuddrjeekgdejtdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemuceutffkvffkuffjvffgnffgvefqofdpqfgfvfenuceurghilhhouhhtmecufedtudenucenucfjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomheplfhonhcuvfhurhhnvgihuceojhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukheqnecuggftrfgrthhtvghrnhepteetieejuedutdeihffhhfelhfffueevkeehvdfhfedugeehtdehgeevfefhieefnecuffhomhgrihhnpegthihgfihinhdrtghomhenucfkphepkedurdduvdelrddugeeirddvtdelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehhvghloheplhhotggrlhhhohhsthdrlhhotggrlhguohhmrghinhdpihhnvghtpeekuddruddvledrudegiedrvddtledpmhgrihhlfhhrohhmpehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkpdhrtghpthhtohepjhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukhdprhgtphhtthhopehnvgiflhhisgesshhouhhrtggvfigrrhgvrdhorhhg X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from localhost.localdomain (81.129.146.209) by sa-prd-rgout-001.btmx-prd.synchronoss.net (5.8.716.04) (authenticated as jonturney@btinternet.com) id 613006A90E368CA8; Wed, 8 Dec 2021 15:04:25 +0000 From: Jon Turney To: newlib@sourceware.org Cc: Jon Turney Subject: [PATCH] Cygwin: Conditionally build documentation Date: Wed, 8 Dec 2021 15:03:40 +0000 Message-Id: <20211208150340.1344-1-jon.turney@dronecode.org.uk> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1197.8 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Dec 2021 15:04:31 -0000 Add a configure option '--disable-doc' to disable building of documentation by 'all' target. Check for the required tools at configure time, and require them if building documentation is enabled. 'make doc' at top-level (or 'cd doc; make') can still make documentation even if it was disabled, if the documentation tools were found. Update instructions for building Cygwin appropriately. (Building documentation remains the default to increase the chances of noticing when building the documentation is broken.) --- Notes: As discussed at [1] [1] https://cygwin.com/pipermail/cygwin-patches/2021q2/011358.html '--disable-doc' or '--disable-docs'... I just can't decide :) winsup/Makefile.am | 6 +++++- winsup/configure.ac | 15 ++++++++++++++- winsup/doc/Makefile.am | 2 +- winsup/doc/faq-programming.xml | 14 +++++++++----- 4 files changed, 29 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..694442008 100644 --- a/winsup/configure.ac +++ b/winsup/configure.ac @@ -88,7 +88,20 @@ 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=$enableval, + enable_doc=yes) +AM_CONDITIONAL(BUILD_DOC, [test $enable_doc != "no"]) + +AC_CHECK_PROGS([DOCBOOK2XTEXI], [docbook2x-texi db2x_docbook2texi]) +AC_CHECK_PROGS([XMLTO], [xmlto]) + +if test "x$enable_doc" != "xno"; then + if test -z "$DOCBOOK2XTEXI" || test -z "$XMLTO"; then + AC_MSG_ERROR([Required documentation tools not found]) + 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 -- 2.34.1