You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jd...@apache.org on 2021/05/26 15:34:26 UTC
[qpid-dispatch] branch main updated: DISPATCH-1995 Fix Ninja errors
when used instead of Make to build docs (#1224)
This is an automated email from the ASF dual-hosted git repository.
jdanek pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git
The following commit(s) were added to refs/heads/main by this push:
new 1ab4f94 DISPATCH-1995 Fix Ninja errors when used instead of Make to build docs (#1224)
1ab4f94 is described below
commit 1ab4f94eac32d081427e62202219278d629a352b
Author: Jiri Daněk <jd...@redhat.com>
AuthorDate: Wed May 26 17:34:19 2021 +0200
DISPATCH-1995 Fix Ninja errors when used instead of Make to build docs (#1224)
* DISPATCH-1995 Specify *.adoc inputs explicitly
Ninja would not run when the DEPENDS argument contained unevaluated glob expression.
* DISPATCH-1995 Use *.8.adoc files from source directory
Previously, copies in the build directory were used.
* -DDOC_XMLLINT=ON
---
.github/workflows/build.yaml | 6 ++++--
docs/books/CMakeLists.txt | 10 +++++++---
docs/man/CMakeLists.txt | 6 ++----
tests/system_test.py | 2 +-
4 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index b3232ce..bd5cfef 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -454,6 +454,8 @@ jobs:
DispatchBuildDir: ${{github.workspace}}/build
InstallPrefix: ${{github.workspace}}/install
DispatchCMakeExtraArgs: >
+ -GNinja
+ -DDOC_XMLLINT=ON
-DCONSOLE_INSTALL=OFF
steps:
@@ -471,12 +473,12 @@ jobs:
- name: Install Linux build dependencies
if: ${{ runner.os == 'Linux' }}
run: |
- sudo apt install -y libqpid-proton-proactor1-dev python3-qpid-proton libpython3-dev libwebsockets-dev libnghttp2-dev
+ sudo apt install -y libqpid-proton-proactor1-dev python3-qpid-proton libpython3-dev libwebsockets-dev libnghttp2-dev ninja-build
- name: Install Linux docs dependencies
if: ${{ runner.os == 'Linux' }}
run: |
- sudo apt install -y asciidoc asciidoctor ruby-asciidoctor-pdf dblatex
+ sudo apt install -y asciidoc asciidoctor ruby-asciidoctor-pdf dblatex libxml2-utils
- name: qpid-dispatch cmake configure
working-directory: ${{env.DispatchBuildDir}}
diff --git a/docs/books/CMakeLists.txt b/docs/books/CMakeLists.txt
index a532df2..b2aa018 100644
--- a/docs/books/CMakeLists.txt
+++ b/docs/books/CMakeLists.txt
@@ -17,6 +17,11 @@
## under the License.
##
+if (POLICY CMP0009)
+ # FILE GLOB_RECURSE calls should not follow symlinks by default.
+ cmake_policy (SET CMP0009 NEW)
+endif ()
+
find_program (ASCIIDOCTOR_EXE asciidoctor DOC "Generate books")
set (
@@ -25,8 +30,7 @@ set (
)
if (ASCIIDOCTOR_EXE)
- # Don't follow symlinks and don't warn about it
- cmake_policy (SET CMP0009 NEW)
+ file (GLOB_RECURSE adoc_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.adoc)
file (GLOB_RECURSE png_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.png)
foreach (file ${png_files})
@@ -40,7 +44,7 @@ if (ASCIIDOCTOR_EXE)
add_custom_command (
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/user-guide/index.html
COMMAND ${ASCIIDOCTOR_EXE} ${CMAKE_CURRENT_SOURCE_DIR}/user-guide/book.adoc -o user-guide/index.html
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/user-guide/*.adoc
+ DEPENDS ${adoc_files}
)
add_custom_target (books DEPENDS ${books})
diff --git a/docs/man/CMakeLists.txt b/docs/man/CMakeLists.txt
index e14d9d7..f0cdcdf 100644
--- a/docs/man/CMakeLists.txt
+++ b/docs/man/CMakeLists.txt
@@ -67,8 +67,6 @@ help2txt (${tools}/qdstat)
add_custom_target (doc_gen DEPENDS ${generated_txt})
-execute_process (COMMAND ${CMAKE_COMMAND} -E copy_directory ${src} ${bin})
-
find_program (ASCIIDOC_EXE asciidoc DOC "Generate HTML documentation")
if (ASCIIDOC_EXE)
@@ -76,7 +74,7 @@ if (ASCIIDOC_EXE)
# Generate HTML
file (GLOB_RECURSE adoc_files *.adoc)
- foreach (source qdmanage.8 qdrouterd.8 qdstat.8 qdrouterd.conf.5)
+ foreach (source ${src}/qdmanage.8 ${src}/qdrouterd.8 ${src}/qdstat.8 ${bin}/qdrouterd.conf.5)
get_filename_component (name ${source} NAME)
get_filename_component (dir ${source} PATH)
string(FIND ${name} "." dot)
@@ -101,7 +99,7 @@ if (ASCIIDOC_EXE)
find_program(A2X_EXE a2x DOC DOC "Generate Unix man pages")
if (A2X_EXE)
# Generate man pages.
- foreach (source ${bin}/qdmanage.8 ${bin}/qdrouterd.8 ${bin}/qdstat.8 ${bin}/qdrouterd.conf.5)
+ foreach (source ${src}/qdmanage.8 ${src}/qdrouterd.8 ${src}/qdstat.8 ${bin}/qdrouterd.conf.5)
get_filename_component (name ${source} NAME)
get_filename_component (dir ${source} PATH)
string(REGEX REPLACE ".*\\.([0-9])$" "\\1" section ${source}) # Man section number
diff --git a/tests/system_test.py b/tests/system_test.py
index adda621..8553810 100755
--- a/tests/system_test.py
+++ b/tests/system_test.py
@@ -743,7 +743,7 @@ class Qdrouterd(Process):
try:
self.management.read(identity="router.node/%s" % router_id)
# TODO aconway 2015-01-29: The above check should be enough, we
- # should not advertise a remote router in managment till it is fully
+ # should not advertise a remote router in management till it is fully
# connected. However we still get a race where the router is not
# actually ready for traffic. Investigate.
# Meantime the following actually tests send-thru to the router.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org