diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 57f97849a1e7a43f8a278e599c0063155908ab16..a4f253d23e9725a93b0916e0d9a680544ea93674 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,32 +1,73 @@ -# -# Copyright -# +# Copyright 2010, Olivier Stasse, JRL, CNRS/AIST +# +# This file is part of dynamic-graph. +# dynamic-graph is free software: you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public License +# as published by the Free Software Foundation, either version 3 of +# the License, or (at your option) any later version. +# +# dynamic-graph is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Lesser Public License for more details. You should have +# received a copy of the GNU Lesser General Public License along with +# dynamic-graph. If not, see <http://www.gnu.org/licenses/>. -# Configure package.dox file -CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/package.dox.cmake - ${CMAKE_CURRENT_BINARY_DIR}/package.dox -) +# MANPAGE +# ------- +# +# Generate a pod man page from a template, then +# generate the man page and compress it. +# This macro also adds the installation rules. +# +MACRO(MANPAGE NAME) + FIND_PROGRAM(POD2MAN pod2man) + CONFIGURE_FILE(${NAME}.pod.in ${NAME}.pod @ONLY) + ADD_CUSTOM_COMMAND( + OUTPUT ${NAME}.1 + COMMAND ${POD2MAN} --section=1 + --center="LOCAL USER COMMANDS" + --release ${PROJECT_NAME} ${NAME}.pod + > ${NAME}.1 + DEPENDS ${BUILD_DIR}/${NAME}.pod) -ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/html/index.html - COMMAND ${DOXYGEN_EXECUTABLE} \"${CMAKE_CURRENT_BINARY_DIR}/package.dox\" -) + ADD_CUSTOM_COMMAND( + OUTPUT ${NAME}.1.gz + COMMAND gzip -c ${NAME}.1 > ${NAME}.1.gz + DEPENDS ${BUILD_DIR}/${NAME}.1) + INSTALL(FILES ${BUILD_DIR}/${NAME}.1.gz DESTINATION share/man/man1) +ENDMACRO(MANPAGE) -ADD_CUSTOM_TARGET(documentation ALL - DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/html/index.html) -# -# Install html documentation -# -# html files -INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html - DESTINATION share/doc/dynamic-graph) +SET(BUILD_DIR ${CMAKE_BINARY_DIR}/doc) + +SET(DOCDIR share/doc/${PROJECT_NAME}) +SET(HTMLDIR ${DOCDIR}/html) + +# Add `doc' target. +ADD_CUSTOM_TARGET( + doc ALL + DEPENDS html/index.html dg-coshell.1.gz) + + +# Generate Doxygen configuration file. +CONFIGURE_FILE(package.dox.cmake package.dox) + +# Generating the Doxygen documentation +ADD_CUSTOM_COMMAND( + OUTPUT html/index.html + COMMAND ${DOXYGEN_EXECUTABLE} package.dox + COMMENT Generating Doxygen documentation +) + +# Doxygen documentation installation rules. +INSTALL(DIRECTORY ${BUILD_DIR}/html DESTINATION ${DOCDIR}) +INSTALL(FILES ${BUILD_DIR}/${PROJECT_NAME}.doxytag DESTINATION ${HTMLDIR}) +INSTALL(DIRECTORY pictures DESTINATION ${HTMLDIR}) -# doxytag -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.doxytag - DESTINATION share/doc/dynamic-graph/html) -# pictures -INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pictures - DESTINATION share/doc/dynamic-graph/html) +# Man page generation. +MANPAGE(dg-shell) +MANPAGE(dg-shell-plugin) diff --git a/doc/dg-shell-plugin.pod.in b/doc/dg-shell-plugin.pod.in new file mode 100644 index 0000000000000000000000000000000000000000..1c09563f6d87775f82507468fa14b7fdfd44b308 --- /dev/null +++ b/doc/dg-shell-plugin.pod.in @@ -0,0 +1,26 @@ +=head1 NAME + +dg-shell-plugin - Stack of tasks shell with all plug-ins loaded + + +=head1 SYNOPSIS + +dg-shell-plugin + + +=head1 DESCRIPTION + +Start the stack of tasks with all core plug-ins loaded. + +=head1 AUTHORS + +This software has been developed at CNRS/AIST and LAAS-CNRS laboratories. + +See <@CMAKE_INSTALL_PREFIX@/share/doc/libdg-middleware-dev/AUTHORS> to +see the list of all contributors. + + +=head1 SEE ALSO + dg-shell(1) + +See also <@PROJECT_URL@> for additional resources. diff --git a/doc/dg-shell.pod.in b/doc/dg-shell.pod.in new file mode 100644 index 0000000000000000000000000000000000000000..28341a7f56c15f738aa874c706378a1f5c95a027 --- /dev/null +++ b/doc/dg-shell.pod.in @@ -0,0 +1,31 @@ +=head1 NAME + +dg-shell - Stack of tasks shell + + +=head1 SYNOPSIS + +dg-shell [FILE] + + +=head1 DESCRIPTION + +Start the stack of tasks and provides to the user an interactive shell +to control the data-flow. + +Optionally, a file which will be interpreted at start-up can be given +to the program. + + +=head1 AUTHORS + +This software has been developed at CNRS/AIST and LAAS-CNRS laboratories. + +See <@CMAKE_INSTALL_PREFIX@/share/doc/libdg-middleware-dev/AUTHORS> to +see the list of all contributors. + + +=head1 SEE ALSO + dg-shell-plugin(1) + +See also <@PROJECT_URL@> for additional resources.