Repository: qpid-dispatch
Updated Branches:
  refs/heads/master 1f7c94f2d -> f324804ac


NO-JIRA: Make xmllint validation optional

On some platforms xmllint is not properly installed so validation fails
when building docs. Make it optional, off by default.


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/f324804a
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/f324804a
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/f324804a

Branch: refs/heads/master
Commit: f324804ac88868fe473c6a2865e71cb46c81a674
Parents: 1f7c94f
Author: Alan Conway <[email protected]>
Authored: Mon Jul 18 12:58:27 2016 -0400
Committer: Alan Conway <[email protected]>
Committed: Mon Jul 18 12:58:27 2016 -0400

----------------------------------------------------------------------
 doc/CMakeLists.txt | 22 +++++++++++++---------
 doc/README         |  2 +-
 2 files changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/f324804a/doc/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 5505d9c..b8c408a 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -20,7 +20,8 @@
 # In old cmake (< 2.8) documentation is built by "make all" so set BUILD_DOC 
OFF
 # if you don't want that. For new cmake it is only built by "make doc"
 option(BUILD_DOCS "Generate documentation with 'make doc'" ON)
-option(BUILD_DOCS_VERBOSE "Verbose output from doc tools for debugging" OFF)
+option(DOC_VERBOSE "Verbose output from doc tools for debugging" OFF)
+option(DOC_XMLLINT "Use xmllint to verify XML output" OFF)
 
 if(BUILD_DOCS)
   if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_LESS "2.8")
@@ -35,11 +36,6 @@ if(BUILD_DOCS)
     endmacro()
   endif()
 
-  if (BUILD_DOCS_VERBOSE)
-    set(VFLAG "-v")
-  endif()
-
-
   # Popular locations
   set(src ${CMAKE_CURRENT_SOURCE_DIR})
   set(bin ${CMAKE_CURRENT_BINARY_DIR})
@@ -48,6 +44,17 @@ if(BUILD_DOCS)
   set(py_management ../python/qpid_dispatch_internal/management)
   set(schema_depends ${schema} ${py_management}/schema_doc.py 
${py_management}/schema.py)
 
+  # Flags for doc tools, based on cmake options
+  set(ADOC_FLAGS "--conf-file=${bin}/asciidoc.conf")
+  set(A2X_FLAGS "--asciidoc-opts=--conf-file=${bin}/asciidoc.conf" -D${bin})
+  if (DOC_VERBOSE)
+    set(ADOC_FLAGS ${ADOC_FLAGS} -v)
+    set(A2X_FLAGS ${A2X_FLAGS} -v)
+  endif()
+  if (NOT DOC_XMLLINT)
+    set(A2X_FLAGS ${A2X_FLAGS} --no-xmllint)
+  endif()
+
   # Generate asciidoc fragments from management schema to incorporate in text
   macro(schema_gen script output)
     add_custom_command(
@@ -92,7 +99,6 @@ if(BUILD_DOCS)
     foreach(source index book/book man/qdmanage.8 man/qdrouterd.8 man/qdstat.8 
${bin}/qdrouterd.conf.5)
       get_filename_component(name ${source} NAME)
       set(output ${bin}/${name}.html)
-      set(ADOC_FLAGS ${VFLAG} --conf-file=${bin}/asciidoc.conf)
       add_custom_command(
         OUTPUT ${output} ${output}.in
         # Pretty .html for direct viewing.
@@ -108,8 +114,6 @@ if(BUILD_DOCS)
 
     find_program(A2X_EXE a2x DOC DOC "Generate Unix man pages")
     if (A2X_EXE)
-      set(A2X_FLAGS ${VFLAG} --asciidoc-opts=--conf-file=${bin}/asciidoc.conf 
-D ${bin})
-
       # Generate man pages.
       foreach(source ${src}/man/qdmanage.8 ${src}/man/qdrouterd.8 
${src}/man/qdstat.8 ${bin}/qdrouterd.conf.5)
         get_filename_component(name ${source} NAME)

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/f324804a/doc/README
----------------------------------------------------------------------
diff --git a/doc/README b/doc/README
index 41e3e05..52c12e4 100644
--- a/doc/README
+++ b/doc/README
@@ -44,5 +44,5 @@ Documentation is written in asciidoc markup. Sub-directories:
   installed.
 
 Some book chapters are generated by python scripts rather than being text
-files. For example `schema.txt` is generated by `schema_txt.py` from the
+files. For example `schema.adoc` is generated by `schema_txt.py` from the
 documentation strings in the management schema `qdrouterd.json`.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to