[Git][NTPsec/ntpsec][master] 2 commits: Redesign doc building options

Richard Laager gitlab at mg.gitlab.com
Tue Feb 11 04:15:49 UTC 2020



Richard Laager pushed to branch master at NTPsec / ntpsec


Commits:
46cbce10 by Richard Laager at 2020-02-11T04:14:35+00:00
Redesign doc building options

Prior to recent changes (i.e. in the last release):
  - HTML docs were not built by default, even if you had asciidoc
    installed.  You had to explicit opt-in with --enable-doc.
  - Man pages were built by default if you had asciidoc installed.
    If asciidoc was not installed, the build continued without building
    man pages.  --disable-manpage could optionally be used (e.g. to
    speed the build).
  - CentOS 6 had too old of an asciidoc, but the build continued without
    building man pages.

After recent changes:
  - HTML docs were built by default.  If you did not have asciidoc(tor)
    installed, waf configure stopped with an error telling you to
    explicitly pass --disable-doc.
  - Man pages were built by default.  If you did not have asciidoc(tor)
    installed, waf configure stopped with an error telling you to
    explicitly pass --disable-manpage.
  - CentOS 6 had too old of an asciidoc. The build would stop with an
    error telling you to explicitly pass --disable-manpage.

  Relative to the previous state, this improved things by:
    - being consistent
    - building the useful docs by default
    - failing loudly so you can't accidentally miss building man pages
  but:
    - broke any build scripts (e.g. in distro packages) passing
      --enable-doc
    - requires CentOS 6 users to pass --disable-doc and
      --disable-manpage
    - requires users to either install asciidoc(tor) or pass
      --disable-doc and --disable-manpage

Now:
  - HTML docs are built by default if you have asciidoc(tor) installed.
    If asciidoc(tor) is not installed, the build continues without
    building HTML docs.  --disable-doc can optionally be used (e.g. to
    speed the build).  --enable-doc can optionally be used (e.g. to
    require that docs be built).
  - Man pages are built by default if you have asciidoc(tor) installed.
    If asciidoc(tor) is not installed, the build continues without
    building man pages.  --disable-manpage can optionally be used (e.g.
    to speed the build).  --enable-manpage can optionally be used (e.g.
    to require that docs be built).
  - CentOS 6 has too old of an asciidoc, but the build continues without
    building man pages.

  Relative to the original state, this keeps the following improvements:
    - being consistent
    - building the useful docs by default (but only when asciidoc(tor)
      is installed)
  allows via --enable-* (but no longer defaults to):
    - failing loudly so you can't accidentally miss building docs
      and/or man pages

  Relative to the intermediate state, it has the following advantages:
    - build scripts with --enable-doc still work
    - CentOS 6 users do not have to pass --disable-doc and
      --disable-manpage
    - users are not required to install asciidoc(tor) or pass
      --disable-doc and --disable-manpage

Additionally:
  - The configure script now outputs a "Build Docs" line to match the
    "Build Manpages" line.
  - The code for the "Build Manpages" output and the actual decision
    check the same thing, which is now a single boolean.

The CI runners are all explicitly enabling or disabling docs as desired,
so those that are supposed to be building docs cannot silently fail
(e.g. if we change the minimum asciidoc(tor) version requirements).

- - - - -
34d309c0 by Richard Laager at 2020-02-11T04:14:35+00:00
Use the full --disable-manpage for CI runners

- - - - -


6 changed files:

- .gitlab-ci.yml
- INSTALL.adoc
- NEWS.adoc
- wafhelpers/asciidoc.py
- wafhelpers/waf.py
- wscript


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -5,7 +5,7 @@ pages:
     - schedules
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev asciidoctor findutils gzip
-    - python3 ./waf configure --prefix=/tmp/docbot-local --htmldir=`pwd`/public/latest/ build install
+    - python3 ./waf configure --prefix=/tmp/docbot-local --htmldir=`pwd`/public/latest/ --enable-doc --disable-manpage build install
     - cp www/favicon.ico public
     - cp docs/top.html.in public/index.html
     - cp docs/top-asciidoc.css public/asciidoc.css
@@ -33,7 +33,7 @@ alpine-basic:
   image: alpine
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
-    - python3 ./waf configure --disable-doc --disable-man build
+    - python3 ./waf configure --disable-doc --disable-manpage build
   tags:
     - gitlab-org
 
@@ -42,7 +42,7 @@ alpine-refclocks:
   image: alpine
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - gitlab-org
 
@@ -52,7 +52,7 @@ alpine-edge-basic:
   allow_failure: true
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
-    - python3 ./waf configure --disable-doc --disable-man build
+    - python3 ./waf configure --disable-doc --disable-manpage build
   tags:
     - gitlab-org
 
@@ -62,7 +62,7 @@ alpine-edge-refclocks:
   allow_failure: true
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - gitlab-org
 
@@ -76,7 +76,7 @@ AsciiDoc-3-Fedora:
     - ln -sv a2x3.py asciidoc3/a2x3
     - ln -sv asciidoc3.py asciidoc3/asciidoc3
     - asciidoc3/asciidoc3 --version||echo -n
-    - PATH=$PWD/asciidoc3:$PATH python3 ./waf configure build
+    - PATH=$PWD/asciidoc3:$PATH python3 ./waf configure --enable-doc --enable-manpage build
   tags:
     - gitlab-org
 
@@ -85,7 +85,7 @@ AsciiDoc-classic2-Alpine:
   image: alpine
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python2-dev asciidoc
-    - python ./waf configure build
+    - python ./waf configure --enable-doc --enable-manpage build
   tags:
     - gitlab-org
 
@@ -94,7 +94,7 @@ AsciiDoc-classic3-Alpine:
   image: alpine
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev asciidoc
-    - python3 ./waf configure build
+    - python3 ./waf configure --enable-doc --enable-manpage build
   tags:
     - gitlab-org
 
@@ -103,7 +103,7 @@ AsciiDoc-no:
   image: alpine
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python2-dev
-    - python ./waf configure --disable-doc --disable-man build
+    - python ./waf configure --disable-doc --disable-manpage build
   tags:
     - gitlab-org
 
@@ -113,7 +113,7 @@ AsciiDoc-py3-Ubuntu:
   script:
     - apt-get update
     - DEBIAN_FRONTEND="noninteractive" apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev asciidoc-base
-    - python3 ./waf configure build
+    - python3 ./waf configure --enable-doc --enable-manpage build
   tags:
     - gitlab-org
 
@@ -123,7 +123,7 @@ debian-oldstable-basic:
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
-    - python3 ./waf configure --disable-doc --disable-man build
+    - python3 ./waf configure --disable-doc --disable-manpage build
   tags:
     - gitlab-org
 
@@ -133,7 +133,7 @@ debian-oldstable-refclocks:
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - gitlab-org
 
@@ -143,7 +143,7 @@ debian-stable-basic:
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
-    - python3 ./waf configure --disable-doc --disable-man build
+    - python3 ./waf configure --disable-doc --disable-manpage build
   tags:
     - gitlab-org
 
@@ -153,7 +153,7 @@ debian-stable-refclocks:
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - gitlab-org
 
@@ -163,7 +163,7 @@ debian-testing-basic:
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
-    - python3 ./waf configure --disable-doc --disable-man build
+    - python3 ./waf configure --disable-doc --disable-manpage build
   tags:
     - gitlab-org
 
@@ -173,7 +173,7 @@ debian-testing-refclocks:
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - gitlab-org
 
@@ -184,7 +184,7 @@ debian-unstable-basic:
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
-    - python3 ./waf configure --disable-doc --disable-man build
+    - python3 ./waf configure --disable-doc --disable-manpage build
   tags:
     - gitlab-org
 
@@ -195,7 +195,7 @@ debian-unstable-refclocks:
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - gitlab-org
 
@@ -205,7 +205,7 @@ ubuntu-latest-basic:
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
-    - python3 ./waf configure --disable-doc --disable-man build
+    - python3 ./waf configure --disable-doc --disable-manpage build
   tags:
     - gitlab-org
 
@@ -215,7 +215,7 @@ ubuntu-latest-refclocks:
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - gitlab-org
 
@@ -225,7 +225,7 @@ ubuntu-rolling-basic:
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
-    - python3 ./waf configure --disable-doc --disable-man build
+    - python3 ./waf configure --disable-doc --disable-manpage build
   tags:
     - gitlab-org
 
@@ -235,7 +235,7 @@ ubuntu-rolling-refclocks:
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - gitlab-org
 
@@ -246,7 +246,7 @@ ubuntu-devel-basic:
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
-    - python3 ./waf configure --disable-doc --disable-man build
+    - python3 ./waf configure --disable-doc --disable-manpage build
   tags:
     - gitlab-org
 
@@ -257,7 +257,7 @@ ubuntu-devel-refclocks:
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - gitlab-org
 
@@ -266,7 +266,7 @@ gcc-latest-basic:
   image: gcc:latest
   script:
     - apt-get update -qq && apt-get install -y -qq bison libcap-dev pps-tools python-dev
-    - python ./waf configure --disable-doc --disable-man build
+    - python ./waf configure --disable-doc --disable-manpage build
   tags:
     - gitlab-org
 
@@ -275,14 +275,14 @@ gcc-latest-refclocks:
   image: gcc:latest
   script:
     - apt-get update -qq && apt-get install -y -qq bison libcap-dev pps-tools python-dev
-    - python ./waf configure --disable-doc --disable-man --refclock=all build
+    - python ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - gitlab-org
 
 freebsd-11-basic:
   <<: *job_definition
   script:
-    - python ./waf configure --disable-doc --disable-man build
+    - python ./waf configure --disable-doc --disable-manpage build
   tags:
     - freebsd-11
   only:
@@ -291,7 +291,7 @@ freebsd-11-basic:
 freebsd-11-refclocks:
   <<: *job_definition
   script:
-    - python ./waf configure --disable-doc --disable-man --refclock=all build
+    - python ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - freebsd-11
   only:
@@ -300,7 +300,7 @@ freebsd-11-refclocks:
 freebsd-12-basic:
   <<: *job_definition
   script:
-    - python ./waf configure --disable-doc --disable-man build
+    - python ./waf configure --disable-doc --disable-manpage build
   tags:
     - freebsd-12
   only:
@@ -309,7 +309,7 @@ freebsd-12-basic:
 freebsd-12-refclocks:
   <<: *job_definition
   script:
-    - python ./waf configure --disable-doc --disable-man --refclock=all build
+    - python ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - freebsd-12
   only:
@@ -320,7 +320,7 @@ centos-latest-basic:
   image: centos:latest
   script:
     - dnf -y install bison gcc openssl-devel libcap-devel python3-devel
-    - python3 ./waf configure --disable-doc --disable-man build
+    - python3 ./waf configure --disable-doc --disable-manpage build
   tags:
     - gitlab-org
 
@@ -329,7 +329,7 @@ centos-latest-refclocks:
   image: centos:latest
   script:
     - dnf -y --enablerepo=PowerTools install bison gcc openssl-devel libcap-devel python3-devel pps-tools-devel
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - gitlab-org
 
@@ -338,7 +338,7 @@ fedora-latest-basic:
   image: fedora:latest
   script:
     - yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3-devel
-    - python3 ./waf configure --disable-doc --disable-man build
+    - python3 ./waf configure --disable-doc --disable-manpage build
   tags:
     - gitlab-org
 
@@ -347,7 +347,7 @@ fedora-latest-refclocks:
   image: fedora:latest
   script:
     - yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3-devel
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - gitlab-org
 
@@ -357,7 +357,7 @@ fedora-rawhide-basic:
   allow_failure: true
   script:
     - yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3-devel
-    - python3 ./waf configure --disable-doc --disable-man build
+    - python3 ./waf configure --disable-doc --disable-manpage build
   tags:
     - gitlab-org
 
@@ -367,7 +367,7 @@ fedora-rawhide-refclocks:
   allow_failure: true
   script:
     - yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3-devel
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - gitlab-org
 
@@ -377,7 +377,7 @@ fedora-rawhide-refclocks-gpsd:
   allow_failure: true
   script:
     - yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3-devel python3-gpsd
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - gitlab-org
 
@@ -387,7 +387,7 @@ python3-rc:
   allow_failure: true
   script:
     - apt-get update -qq && apt-get install -y -qq bison libcap-dev pps-tools
-    - python ./waf configure --disable-doc --disable-man --refclock=all build
+    - python ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - gitlab-org
 
@@ -395,7 +395,7 @@ python-coverage:
   <<: *job_definition
   script:
     - apt-get update -qq && apt-get install -y -qq netbase bison python-dev python-coverage
-    - python ./waf configure --disable-doc --disable-man build
+    - python ./waf configure --disable-doc --disable-manpage build
     - for i in build/main/tests/pylib/test_*; do python-coverage run -a --source build/main/pylib $i; done
     - python-coverage report
   tags:
@@ -407,7 +407,7 @@ clang-basic:
   script:
     - apt-get update
     - apt-get install -y netbase bison libssl-dev libcap-dev pps-tools python-dev clang
-    - python ./waf configure --disable-doc --disable-man --check-c-compiler=clang build
+    - python ./waf configure --disable-doc --disable-manpage --check-c-compiler=clang build
   tags:
     - gitlab-org
 
@@ -417,7 +417,7 @@ clang-refclocks:
   script:
     - apt-get update
     - apt-get install -y netbase bison libssl-dev libcap-dev pps-tools python-dev clang
-    - python ./waf configure --disable-doc --disable-man --check-c-compiler=clang --refclock=all build
+    - python ./waf configure --disable-doc --disable-manpage --check-c-compiler=clang --refclock=all build
   tags:
     - gitlab-org
 
@@ -426,7 +426,7 @@ openSUSE-leap-basic:
   image: opensuse/leap
   script:
     - zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python-devel python-curses
-    - python ./waf configure --disable-doc --disable-man build
+    - python ./waf configure --disable-doc --disable-manpage build
   tags:
     - gitlab-org
 
@@ -435,7 +435,7 @@ openSUSE-leap-refclocks:
   image: opensuse/leap
   script:
     - zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python-devel python-curses
-    - python ./waf configure --disable-doc --disable-man --refclock=all build
+    - python ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - gitlab-org
 
@@ -445,7 +445,7 @@ openSUSE-tumbleweed-basic:
   allow_failure: true
   script:
     - zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python-devel python-curses
-    - python ./waf configure --disable-doc --disable-man build
+    - python ./waf configure --disable-doc --disable-manpage build
   tags:
     - gitlab-org
 
@@ -455,7 +455,7 @@ openSUSE-tumbleweed-refclocks:
   allow_failure: true
   script:
     - zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python-devel python-curses
-    - python ./waf configure --disable-doc --disable-man --refclock=all build
+    - python ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - gitlab-org
 
@@ -465,7 +465,7 @@ debian-stable-basic-32bit:
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python-dev
-    - python ./waf configure --disable-doc --disable-man build
+    - python ./waf configure --disable-doc --disable-manpage build
   tags:
     - gitlab-org
 
@@ -475,7 +475,7 @@ debian-stable-refclocks-32bit:
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python-dev
-    - python ./waf configure --disable-doc --disable-man --refclock=all build
+    - python ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - gitlab-org
 
@@ -485,7 +485,7 @@ debian-stable-mDNS-basic:
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python-dev libavahi-compat-libdnssd-dev
-    - python ./waf configure --disable-doc --disable-man build
+    - python ./waf configure --disable-doc --disable-manpage build
   tags:
     - gitlab-org
 
@@ -495,14 +495,14 @@ debian-stable-mDNS-refclocks:
   script:
     - apt-get update
     - apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python-dev libavahi-compat-libdnssd-dev
-    - python ./waf configure --disable-doc --disable-man --refclock=all build
+    - python ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - gitlab-org
 
 cross-build:
   <<: *job_definition
   script:
-    - PYTHON_VERSION=2.7 PYTAG=cpython27 pyext_PATTERN="%s.so" PYTHON_LDFLAGS='-lpthread -ldl' ./waf configure --disable-doc --disable-man --cross-compiler=arm-linux-gnueabihf-gcc-5 --cross-cflags '-I/srv/arm-local/include -I/srv/arm-local/include/python2.7' --cross-ldflags '-L/srv/arm-local/lib' --pythondir=/srv/arm-local/lib/python2.7/dist-packages --pythonarchdir=/srv/arm-local/lib/python2.7/dist-packages build
+    - PYTHON_VERSION=2.7 PYTAG=cpython27 pyext_PATTERN="%s.so" PYTHON_LDFLAGS='-lpthread -ldl' ./waf configure --disable-doc --disable-manpage --cross-compiler=arm-linux-gnueabihf-gcc-5 --cross-cflags '-I/srv/arm-local/include -I/srv/arm-local/include/python2.7' --cross-ldflags '-L/srv/arm-local/lib' --pythondir=/srv/arm-local/lib/python2.7/dist-packages --pythonarchdir=/srv/arm-local/lib/python2.7/dist-packages build
   tags:
     - ubuntu-1604-lts
   only:
@@ -514,7 +514,7 @@ gentoo-basic:
   script:
     - emerge-webrsync
     - emerge -q y sys-libs/libcap sys-devel/bison net-misc/pps-tools
-    - python ./waf configure --disable-doc --disable-man build
+    - python ./waf configure --disable-doc --disable-manpage build
   tags:
     - gitlab-org
 
@@ -524,7 +524,7 @@ gentoo-refclocks:
   script:
     - emerge-webrsync
     - emerge -q y sys-libs/libcap sys-devel/bison net-misc/pps-tools
-    - python ./waf configure --disable-doc --disable-man --refclock=all build
+    - python ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - gitlab-org
 
@@ -534,7 +534,7 @@ gentoo-hardened-basic:
   script:
     - emerge-webrsync
     - emerge -q y sys-libs/libcap sys-devel/bison net-misc/pps-tools
-    - python ./waf configure --disable-doc --disable-man build
+    - python ./waf configure --disable-doc --disable-manpage build
   tags:
     - gitlab-org
 
@@ -544,13 +544,13 @@ gentoo-hardened-refclocks:
   script:
     - emerge-webrsync
     - emerge -q y sys-libs/libcap sys-devel/bison net-misc/pps-tools
-    - python ./waf configure --disable-doc --disable-man --refclock=all build
+    - python ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - gitlab-org
 
 coverity-scan:
   script:
-    - ./waf configure --disable-doc --disable-man --refclock=all
+    - ./waf configure --disable-doc --disable-manpage --refclock=all
     - /opt/cov-analysis/bin/cov-build --dir cov-int ./waf build
     - tar czf ntpsec_coverity.tgz cov-int
     - curl --form token=$COVERITY_TOKEN --form email=security at ntpsec.org --form file=@ntpsec_coverity.tgz --form version="$(git rev-parse --short HEAD)" --form description="Automatic submission by gitlab-ci" https://scan.coverity.com/builds?project=ntpsec
@@ -562,7 +562,7 @@ coverity-scan:
 macos-basic:
   <<: *job_definition
   script:
-    - PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig python ./waf configure --disable-doc --disable-man build
+    - PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig python ./waf configure --disable-doc --disable-manpage build
   tags:
     - macos
   only:
@@ -571,7 +571,7 @@ macos-basic:
 macos-refclocks:
   <<: *job_definition
   script:
-    - PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig python ./waf configure --disable-doc --disable-man --refclock=all build
+    - PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig python ./waf configure --disable-doc --disable-manpage --refclock=all build
   tags:
     - macos
   only:
@@ -582,7 +582,7 @@ feature-classic-mode:
   image: alpine
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all --enable-classic-mode build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-classic-mode build
   tags:
     - gitlab-org
 
@@ -591,7 +591,7 @@ feature-seccomp:
   image: alpine
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev libseccomp-dev
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all --enable-seccomp build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-seccomp build
   tags:
     - gitlab-org
 
@@ -600,7 +600,7 @@ feature-debug:
   image: alpine
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all --enable-debug build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-debug build
   tags:
     - gitlab-org
 
@@ -609,7 +609,7 @@ feature-debug-gdb:
   image: alpine
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all --enable-debug-gdb build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-debug-gdb build
   tags:
     - gitlab-org
 
@@ -618,7 +618,7 @@ feature-debug-timing:
   image: alpine
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all --enable-debug-timing build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-debug-timing build
   tags:
     - gitlab-org
 
@@ -627,7 +627,7 @@ feature-disable-droproot:
   image: alpine
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all --disable-droproot build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --disable-droproot build
   tags:
     - gitlab-org
 
@@ -636,7 +636,7 @@ feature-early-droproot:
   image: alpine
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all --enable-early-droproot build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-early-droproot build
   tags:
     - gitlab-org
 
@@ -645,7 +645,7 @@ feature-leap-smear:
   image: alpine
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all --enable-leap-smear build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-leap-smear build
   tags:
     - gitlab-org
 
@@ -654,6 +654,6 @@ feature-mssntp:
   image: alpine
   script:
     - apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev
-    - python3 ./waf configure --disable-doc --disable-man --refclock=all --enable-mssntp build
+    - python3 ./waf configure --disable-doc --disable-manpage --refclock=all --enable-mssntp build
   tags:
     - gitlab-org


=====================================
INSTALL.adoc
=====================================
@@ -95,8 +95,7 @@ asciidoc, a2x::
    or asciidoc3.
    Debian/Ubuntu: asciidoc
    Fedora/CentOS: asciidoc
-   CentOS 6: asciidoc is only 8.4.5.  You must configure with --disable-doc
-             and --disable-man.
+   CentOS 6: asciidoc is only 8.4.5.  You cannot build docs or man pages.
    Gentoo: app-text/asciidoc
    SLES: asciidoc
 


=====================================
NEWS.adoc
=====================================
@@ -25,13 +25,9 @@ processor.  asciidoc is still supported, but the minimum supported version
 has been raised from 8.6.0 to 8.6.8.  asciidoc3 (3.0.2 or newer) is also
 supported.
 
-If no supported AsciiDoc processor is installed, you now must explicitly
-pass --disable-man to waf configure.  Previously, --disable-man was implied
-if no processor was found.  For example, CentOS 6 users will have to configure
-with --disable-man, as asciidoc is only version 8.4.5.
-
-HTML docs are now built by default.  The --enable-doc configure option has
-been replaced by --disable-doc.
+HTML docs are now built by default if an AsciiDoc processor is installed.  If
+you do not want HTML docs, configure with --disable-doc.  (Note:  Man pages
+are controlled by a separate --disable-manpage.)
 
 == 2019-11-17: 1.1.8 ==
 


=====================================
wafhelpers/asciidoc.py
=====================================
@@ -11,15 +11,26 @@ def options(opt):
     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_true',
+                   default=False, help='Enable HTML document building.')
     grp.add_option('--disable-manpage', action='store_true',
                    default=False, help='Disable manpage building.')
+    grp.add_option('--enable-manpage', action='store_true',
+                   default=False, help='Enable 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_doc and ctx.options.enable_doc:
+        ctx.fatal('--disable-doc and --enable-doc conflict.')
+    if ctx.options.disable_manpage and ctx.options.enable_manpage:
+        ctx.fatal('--disable-manpage and --enable-manpage conflict.')
+
+    ctx.env.BUILD_DOC = False
+    ctx.env.BUILD_MAN = False
+    if ctx.options.disable_doc and ctx.options.disable_manpage:
         ctx.msg('AsciiDoc processor', 'unnecessary')
-        ctx.env.BIN_ASCIIDOC = []
         return
 
     # asciidoctor versions < 1.5.8 throw warnings for manpages and driver_shm.
@@ -66,15 +77,20 @@ def configure(ctx):
                         version_string, color=color)
 
     if not ctx.env.BIN_ASCIIDOC:
+        if not (ctx.options.enable_doc or ctx.options.enable_manpage):
+            # The user did not require either, so this is fine.
+            return
+
         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'
+        if ctx.options.enable_doc:
+            error += ', remove --enable-doc'
+        if ctx.options.enable_manpage:
+            error += ', remove --enable-manpage'
         ctx.fatal(error)
 
-    ctx.env.ARGS_DOC = False
-    ctx.env.ARGS_MAN = False
+    ctx.env.BUILD_DOC = not ctx.options.disable_doc
+    ctx.env.BUILD_MAN = not ctx.options.disable_manpage
+
     if 'asciidoctor' in ctx.env.BIN_ASCIIDOC[0]:
         ctx.env.ARGS_DOC = [
             ctx.env.BIN_ASCIIDOC[0],
@@ -105,12 +121,10 @@ def configure(ctx):
                 '-a', 'attribute-missing=warn',
                 '-f', 'manpage', '--no-xmllint',
                 ]
-        elif not ctx.options.disable_manpage:
-            ctx.fatal('asciidoc(tor) toolchain is required in order '
-                      'to build man pages')
-    else:
-        ctx.fatal('asciidoc(tor) toolchain is required in order '
-                  'to build documentation')
+        else:
+            if ctx.options.enable_manpage:
+                ctx.fatal('a2x/xsltproc not found, remove --enable-manpage')
+            ctx.env.BUILD_MAN = False
 
 
 def build(ctx):
@@ -121,7 +135,7 @@ def build(ctx):
             ctx.env.ARGS_DOC += ['-v']
         if ctx.env.ARGS_MAN:
             ctx.env.ARGS_MAN += ['-v']
-    if ctx.env.ARGS_DOC and ctx.variant == 'main':
+    if ctx.env.BUILD_DOC and ctx.variant == 'main':
         ctx.recurse('docs')
 
 


=====================================
wafhelpers/waf.py
=====================================
@@ -41,7 +41,7 @@ def manpage_subst_fun(self, code):
 @conf
 def manpage(ctx, section, source):
 
-    if not ctx.env.ARGS_MAN or ctx.env.DISABLE_MANPAGE:
+    if not ctx.env.BUILD_MAN:
         return
 
     ctx(features="subst",


=====================================
wscript
=====================================
@@ -149,10 +149,6 @@ def configure(ctx):
     ctx.find_program("awk", var="BIN_AWK", mandatory=False)
     ctx.find_program("sh", var="BIN_SH", mandatory=False)
 
-    # Disable manpages within build()
-    if ctx.options.disable_manpage:
-        ctx.env.DISABLE_MANPAGE = True
-
     ctx.check_cfg(
         package='systemd', variables=['systemdsystemunitdir'],
         uselib_store='SYSTEMD', mandatory=False,
@@ -852,8 +848,8 @@ int main(int argc, char **argv) {
     msg_setting("Droproot Support", droproot_type)
     msg_setting("Debug Support", yesno(ctx.options.enable_debug))
     msg_setting("Refclocks", ", ".join(sorted(ctx.env.REFCLOCK_LIST)))
-    msg_setting("Build Manpages",
-                yesno(ctx.env.ENABLE_DOC and not ctx.env.DISABLE_MANPAGE))
+    msg_setting("Build Docs", yesno(ctx.env.BUILD_DOC))
+    msg_setting("Build Manpages", yesno(ctx.env.BUILD_MAN))
 
     ctx.recurse("pylib")
     # Convert the Python directories to absolute paths.



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/compare/acaa9832b901e29f46810670b524a02f2a8dc55b...34d309c0c67b98fbfe730ae3bd7199cf62dc2ecc

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/compare/acaa9832b901e29f46810670b524a02f2a8dc55b...34d309c0c67b98fbfe730ae3bd7199cf62dc2ecc
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20200211/23b98074/attachment-0001.htm>


More information about the vc mailing list