You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2015/01/20 22:57:39 UTC

svn commit: r1653381 - in /qpid/dispatch/trunk/doc: CMakeLists.txt README api/CMakeLists.txt api/doxygen.in book/CMakeLists.txt index.md

Author: aconway
Date: Tue Jan 20 21:57:39 2015
New Revision: 1653381

URL: http://svn.apache.org/r1653381
Log:
NO-JIRA: More documentation fixes.

Added:
    qpid/dispatch/trunk/doc/index.md
Modified:
    qpid/dispatch/trunk/doc/CMakeLists.txt
    qpid/dispatch/trunk/doc/README
    qpid/dispatch/trunk/doc/api/CMakeLists.txt
    qpid/dispatch/trunk/doc/api/doxygen.in
    qpid/dispatch/trunk/doc/book/CMakeLists.txt

Modified: qpid/dispatch/trunk/doc/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/doc/CMakeLists.txt?rev=1653381&r1=1653380&r2=1653381&view=diff
==============================================================================
--- qpid/dispatch/trunk/doc/CMakeLists.txt (original)
+++ qpid/dispatch/trunk/doc/CMakeLists.txt Tue Jan 20 21:57:39 2015
@@ -17,33 +17,55 @@
 ## under the License.
 ##
 
-find_package(Doxygen)
-find_program(PANDOC pandoc)
-find_program(PDFLATEX pdflatex)
-
-# Create an option to enable/disable a doc tool and check if the tool is present.
-# If tool is present, option defaults to ON else OFF.
-# If option is set ON by user and tool is not present, that is an error.
-# If tool is not present and option is not set on just issue a status message.
-# 
-macro(doc_tool tool use var what)
-  if(${var})
-    option(${use} "Generate ${what} with ${tool}" ON)
-  else(${var})
-    option(${use} "Generate ${what} with ${tool}" OFF)
-    if(${use})
-      message(SEND_ERROR "${use} enabled but ${tool} not found.")
-    else(${use})
-      message(STATUS "${tool} not found, not generating ${what}.")
-    endif(${use})
-  endif(${var})
-endmacro()
-
-doc_tool(pandoc USE_PANDOC PANDOC "HTML and man page documentation")
-doc_tool(pdflatex USE_PDFLATEX PDFLATEX "PDF documentation (also requires pandoc)")
-doc_tool(doxygen USE_DOXYGEN DOXYGEN_FOUND "API documentation")
-doc_tool(dot USE_DOT DOT "Generate diagrams in API documentation (also requires doxygen)")
-
-add_subdirectory(api)
-add_subdirectory(man)
-add_subdirectory(book)
+
+option(BUILD_DOCS "Generate documentation" ON)
+
+set(src ${CMAKE_CURRENT_SOURCE_DIR})
+set(bin ${CMAKE_CURRENT_BINARY_DIR})
+
+if(BUILD_DOCS)
+
+  find_package(Doxygen)
+  find_program(PANDOC pandoc)
+  find_program(PDFLATEX pdflatex)
+
+  # Create an option to enable/disable a doc tool and check if the tool is present.
+  # If tool is present, option defaults to ON else OFF.
+  # If option is set ON by user and tool is not present, that is an error.
+  # If tool is not present and option is not set on just issue a status message.
+  #
+  macro(doc_tool tool use var what)
+    if(${var})
+      option(${use} "Generate ${what} with ${tool}" ON)
+    else(${var})
+      option(${use} "Generate ${what} with ${tool}" OFF)
+      if(${use})
+        message(SEND_ERROR "${use} enabled but ${tool} not found.")
+      else(${use})
+        message(STATUS "${tool} not found, not generating ${what}.")
+      endif(${use})
+    endif(${var})
+  endmacro()
+
+  doc_tool(pandoc USE_PANDOC PANDOC "HTML and man page documentation")
+  doc_tool(pdflatex USE_PDFLATEX PDFLATEX "PDF documentation (also requires pandoc)")
+  doc_tool(doxygen USE_DOXYGEN DOXYGEN_FOUND "API documentation")
+  doc_tool(dot USE_DOT DOT "diagrams in API documentation (also requires doxygen)")
+
+  add_subdirectory(api)
+  add_subdirectory(man)
+  add_subdirectory(book)
+
+  # Index for installed doc
+  install(FILES ${src}/index.md DESTINATION ${QD_DOC_INSTALL_DIR})
+  if(USE_PANDOC)
+    add_custom_command(
+      OUTPUT ${bin}/index.html
+      COMMAND ${PANDOC} --standalone -f markdown -t html -o ${bin}/index.html ${src}/index.md
+      DEPENDS ${src}/index.md
+      )
+    add_custom_target(doc-index ALL DEPENDS ${bin}/index.html)
+    install(FILES ${bin}/index.html DESTINATION ${QD_DOC_INSTALL_DIR})
+  endif(USE_PANDOC)
+
+endif(BUILD_DOCS)

Modified: qpid/dispatch/trunk/doc/README
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/doc/README?rev=1653381&r1=1653380&r2=1653381&view=diff
==============================================================================
--- qpid/dispatch/trunk/doc/README (original)
+++ qpid/dispatch/trunk/doc/README Tue Jan 20 21:57:39 2015
@@ -9,7 +9,8 @@ PDF.
 All markdown, HTML and PDF documentation is installed in the share/doc
 directory. Man pages are also installed in the standard share/man location.
 
-The Qpid website also has documentation for each release.
+The [dispatch web site](http://qpid.apache.org/components/dispatch-router) has
+documentation for each release.
 
 Sub-directories:
 
@@ -23,6 +24,6 @@ Sub-directories:
 that's primarily of developer interest. These are not installed.
 
 
-[markdown]: http://daringfireball.net/projects/markdown/syntax "Makrdown syntax"
+[markdown]: http://daringfireball.net/projects/markdown/syntax "Markdown syntax"
 
 [pandoc]: http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown "Pandoc markdown syntax"

Modified: qpid/dispatch/trunk/doc/api/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/doc/api/CMakeLists.txt?rev=1653381&r1=1653380&r2=1653381&view=diff
==============================================================================
--- qpid/dispatch/trunk/doc/api/CMakeLists.txt (original)
+++ qpid/dispatch/trunk/doc/api/CMakeLists.txt Tue Jan 20 21:57:39 2015
@@ -21,13 +21,19 @@ if(USE_DOXYGEN)
 
   # Create doxygen configuration files.
   function(configure_doxygen  HTML_OUTPUT INPUT MORE_CONFIG)
+    if(USE_DOT)
+      set(HAVE_DOT yes)
+    else()
+      set(HAVE_DOT no)
+    endif()
+    # Arguments and local variables are used to configure doxygen.in
     configure_file(
       ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.in
       ${CMAKE_CURRENT_BINARY_DIR}/${HTML_OUTPUT}.doxygen)
   endfunction(configure_doxygen)
 
-  configure_doxygen(user "${CMAKE_SOURCE_DIR}/include" "")
-  configure_doxygen(dev "${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/src"
+  configure_doxygen(api "${CMAKE_SOURCE_DIR}/include" "")
+  configure_doxygen(api_dev "${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/src"
     "ENABLED_SECTIONS=INTERNAL\nINTERNAL_DOCS=yes\nEXTRACT_ALL=yes")
 
   # This is not ideal: if files are added/removed it won't be detected til we re-run cmake.
@@ -36,17 +42,17 @@ if(USE_DOXYGEN)
     ${CMAKE_SOURCE_DIR}/src/*.h
     ${CMAKE_SOURCE_DIR}/src/*.c)
 
-  add_custom_command (OUTPUT user
-    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen-wrapper.py ${DOXYGEN_EXECUTABLE} user.doxygen
+  add_custom_command (OUTPUT api
+    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen-wrapper.py ${DOXYGEN_EXECUTABLE} api.doxygen
     DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.in ${API_SOURCES})
 
-  add_custom_command (OUTPUT dev
-    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen-wrapper.py ${DOXYGEN_EXECUTABLE} dev.doxygen
+  add_custom_command (OUTPUT api_dev
+    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/doxygen-wrapper.py ${DOXYGEN_EXECUTABLE} api_dev.doxygen
     DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/doxygen.in ${API_SOURCES})
 
-  add_custom_target(apidocs ALL DEPENDS user dev)
+  add_custom_target(apidocs ALL DEPENDS api api_dev)
 
-  install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/user/ DESTINATION ${QD_DOC_INSTALL_DIR}/api)
-  install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/dev/ DESTINATION ${QD_DOC_INSTALL_DIR}/api_dev)
+  install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/api DESTINATION ${QD_DOC_INSTALL_DIR})
+  install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/api_dev DESTINATION ${QD_DOC_INSTALL_DIR})
 
 endif(USE_DOXYGEN)

Modified: qpid/dispatch/trunk/doc/api/doxygen.in
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/doc/api/doxygen.in?rev=1653381&r1=1653380&r2=1653381&view=diff
==============================================================================
--- qpid/dispatch/trunk/doc/api/doxygen.in (original)
+++ qpid/dispatch/trunk/doc/api/doxygen.in Tue Jan 20 21:57:39 2015
@@ -26,7 +26,7 @@ STRIP_FROM_PATH         = ${CMAKE_SOURCE
 DISABLE_INDEX           = yes
 GENERATE_LATEX          = no
 GENERATE_TREEVIEW       = yes
-HAVE_DOT                = ${USE_DOT}
+HAVE_DOT                = ${HAVE_DOT}
 JAVADOC_AUTOBRIEF       = yes
 QUIET                   = yes
 RECURSIVE               = yes

Modified: qpid/dispatch/trunk/doc/book/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/doc/book/CMakeLists.txt?rev=1653381&r1=1653380&r2=1653381&view=diff
==============================================================================
--- qpid/dispatch/trunk/doc/book/CMakeLists.txt (original)
+++ qpid/dispatch/trunk/doc/book/CMakeLists.txt Tue Jan 20 21:57:39 2015
@@ -41,7 +41,7 @@ if(USE_PANDOC)
 
   # Generate a book with the given suffix. Extra arguments are passed to pandoc
   macro(generate_book SUFFIX)
-    set(OUTPUT ${bin}/qpid-dispatch-book${SUFFIX})
+    set(OUTPUT ${bin}/book${SUFFIX})
     add_custom_command(
       OUTPUT ${OUTPUT}
       COMMAND ${PANDOC} ${PD_ARGS} -o ${OUTPUT} ${ARGN} ${BOOK}
@@ -54,12 +54,10 @@ if(USE_PANDOC)
   generate_book(.html)          # Complete HTML document.
   generate_book(.html.in --template ${src}/site-html.pd) # Headless fragment for Qpid website.
 
-  find_program(PDFLATEX pdflatex)
-  if (PDFLATEX)
+  if (USE_PDFLATEX)
     generate_book(.pdf)      # Complete PDF document.
-  else(PDFLATEX)
-    message("Not generating PDF format book, pdflatex not available.")
-  endif(PDFLATEX)
+  endif(USE_PDFLATEX)
+
 endif(USE_PANDOC)
 
 # Target to generate all chapters and books.

Added: qpid/dispatch/trunk/doc/index.md
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/doc/index.md?rev=1653381&view=auto
==============================================================================
--- qpid/dispatch/trunk/doc/index.md (added)
+++ qpid/dispatch/trunk/doc/index.md Tue Jan 20 21:57:39 2015
@@ -0,0 +1,20 @@
+<!--*-markdown-*-
+Index for installed documentation.
+-->
+
+# Documentation for dispatch
+
+See [the dispatch web site](http://qpid.apache.org/components/dispatch-router)
+
+Documentation
+
+- [Dispatch router book](book.html) ([PDF](book.pdf))
+- [Dispatch Library API](api/index.html)
+
+Manual pages
+
+- [qdrouterd](qdrouterd.8.html) The router daemon
+- [qdrouterd.conf](qdrouterd.conf.5.html) Router daemon configuration
+- [qdstat](qdstat.8.html) Check statistics for a running router
+- [qdmanage](qdmanage.8.html) Query and set management attributes of a running router.
+



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org