On Sun, Feb 2, 2020 at 7:27 PM Eric S. Raymond via devel
<devel@ntpsec.org> wrote:
> Richard Laager via devel <devel@ntpsec.org>:
> > On 2/2/20 3:44 PM, Jason Azze via devel wrote:
> > > It looks like the --enable-doc waf configuration option was removed in 
> > > the commit "Add support for other asciidoc processors". Was there any 
> > > discussion about this change?
> >
> > Yes. See the mailing list archive and MR !1037.
>
> That MR conflated at least two changes that shouldb have been made
> separately. And I don't see any rationale for the questionable part,
> which is changing the configuration default.
>
> Thios is partly my fault.  U've been concentrating pretty hard on the
> GCC conversionm for months and havem't exercised the oversight I
> should have.  Well, that epic is over; I'm back.
>
> OK, I reached the relevant devs on #ntpsec.  Will pursue there.

Attached is a mostly untested patch that removes --disable-doc,
re-adds --enable-doc, and fails to build both mostly silently if
there is not a valid toolset available.
From 59a22cf98435307fcfe37306aeae93f126bc3d4c Mon Sep 17 00:00:00 2001
From: James Browning <jamesb.f...@gmail.com>
Date: Sun, 2 Feb 2020 20:23:22 -0800
Subject: [PATCH] Revert policy changes from 'Add support for other asciidoc
 processors'

---
 wafhelpers/asciidoc.py | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/wafhelpers/asciidoc.py b/wafhelpers/asciidoc.py
index 8e6946afe..dc055bb1e 100644
--- a/wafhelpers/asciidoc.py
+++ b/wafhelpers/asciidoc.py
@@ -9,15 +9,15 @@ from waflib.TaskGen import extension  # pylint: disable=import-error
 def options(opt):
     'Add command line options for AsciiDoc processing.'
     grp = opt.add_option_group('NTP documentation configure options')
-    grp.add_option('--disable-doc', action='store_true',
-                   default=False, help='Disable HTML document building.')
+    grp.add_option('--enable-doc', action='store_false',
+                   default=True, help='Enable HTML document building.')
     grp.add_option('--disable-manpage', action='store_true',
                    default=False, help='Disable manpage building.')
 
 
 def configure(ctx):
     'Set options from the extended environment and command line arguments.'
-    if ctx.options.disable_manpage and ctx.options.disable_doc:
+    if ctx.options.disable_manpage and ctx.options.enable_doc:
         ctx.msg('AsciiDoc processor', 'unnecessary')
         ctx.env.BIN_ASCIIDOC = []
         return
@@ -69,9 +69,12 @@ def configure(ctx):
         error = 'no AsciiDoc processor qualified'
         if not ctx.options.disable_manpage:
             error += ', add --disable-man'
-        if not ctx.options.disable_doc:
-            error += ', add --disable-doc'
-        ctx.fatal(error)
+        if not ctx.options.enable_doc:
+            error += ', remove --enable-doc'
+#        ctx.fatal(error)
+        ctx.options.enable_doc = False
+        ctx.options.disable_manpage = True
+        return
 
     ctx.env.ARGS_DOC = False
     ctx.env.ARGS_MAN = False
-- 
2.24.0

_______________________________________________
devel mailing list
devel@ntpsec.org
http://lists.ntpsec.org/mailman/listinfo/devel

Reply via email to