From: <ai...@us...> - 2009-09-22 01:38:41
|
Revision: 10454 http://plplot.svn.sourceforge.net/plplot/?rev=10454&view=rev Author: airwin Date: 2009-09-22 01:38:35 +0000 (Tue, 22 Sep 2009) Log Message: ----------- Implement a doxygen_built target (which builds all our doxygen documentation in doc/doxygen in the build tree) if the cmake command-line option -DBUILD_DOX_DOC=ON is set (this options defaults to OFF). I have set up the build system so that "make clean" removes the doc/doxygen directory in the build tree and "make all" (or "make" or "make doxygen_built") builds that documentation. Modified Paths: -------------- trunk/cmake/modules/plplot.cmake trunk/doc/CMakeLists.txt trunk/doc/Doxyfile.in Added Paths: ----------- trunk/cmake/modules/doxygen.cmake Added: trunk/cmake/modules/doxygen.cmake =================================================================== --- trunk/cmake/modules/doxygen.cmake (rev 0) +++ trunk/cmake/modules/doxygen.cmake 2009-09-22 01:38:35 UTC (rev 10454) @@ -0,0 +1,32 @@ +# cmake/modules/plplot.cmake +# +# Copyright (C) 2006, 2007, 2008, 2009 Alan W. Irwin +# +# This file is part of PLplot. +# +# PLplot is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published +# by the Free Software Foundation; version 2 of the License. +# +# PLplot 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 Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public License +# along with the file PLplot; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +# Module file to decide whether to build doxygen documentation and +# and, if so, find the necessary doxygen command. + +option(BUILD_DOX_DOC "Build doxygen documentation" OFF) + +if(BUILD_DOX_DOC) + find_package(Doxygen) + if(NOT DOXYGEN_FOUND) + message(STATUS "WARNING: " + "Cannot find doxygen so disabling doxygen documentation build.") + set(BUILD_DOX_DOC OFF CACHE BOOL "Build doxygen documentation" FORCE) + endif(NOT DOXYGEN_FOUND) +endif(BUILD_DOX_DOC) Property changes on: trunk/cmake/modules/doxygen.cmake ___________________________________________________________________ Added: svn:eol-style + native Modified: trunk/cmake/modules/plplot.cmake =================================================================== --- trunk/cmake/modules/plplot.cmake 2009-09-22 01:29:46 UTC (rev 10453) +++ trunk/cmake/modules/plplot.cmake 2009-09-22 01:38:35 UTC (rev 10454) @@ -461,6 +461,7 @@ # Miscellaneous other features - including docbook documentation # ======================================================================= include(docbook) +include(doxygen) include(summary) Modified: trunk/doc/CMakeLists.txt =================================================================== --- trunk/doc/CMakeLists.txt 2009-09-22 01:29:46 UTC (rev 10453) +++ trunk/doc/CMakeLists.txt 2009-09-22 01:38:35 UTC (rev 10454) @@ -1,7 +1,11 @@ +# Process documentation for the PLplot project. + +# Process man pages in this subdirectory. + set(core_manpages plm2gif.1 plpr.1 pltek.1) if(PLD_pstex) - set(core_manpages ${core_manpages} pstex2eps.1) + set(core_manpages ${core_manpages} pstex2eps.1) endif(PLD_pstex) if(PLD_plmeta) @@ -15,6 +19,33 @@ set(manpages ${manpages} ${tcl_manpages}) endif (ENABLE_tcl) -add_subdirectory( docbook ) +install(FILES ${manpages} DESTINATION ${MAN_DIR}/man1) -install(FILES ${manpages} DESTINATION ${MAN_DIR}/man1) +# Process the docbook documentation. +add_subdirectory(docbook) + +# Process the doxygen documentation. + +if(BUILD_DOX_DOC) + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in + ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + @ONLY + ) + + # Notes: OUTPUT file is a directory so this insures "make clean" + # removes that directory. This command depends on all sourcefiles, + # but do not keep track of those dependencies. Instead, use a + # dependency on the Doxyfile configured above simply to make sure + # this command is only run once (initially or after "make clean"). + add_custom_command( + OUTPUT + ${CMAKE_CURRENT_BINARY_DIR}/doxygen + COMMAND ${DOXYGEN_EXECUTABLE} + DEPENDS + ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + ) + add_custom_target(doxygen_built ALL + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/doxygen + ) +endif(BUILD_DOX_DOC) Modified: trunk/doc/Doxyfile.in =================================================================== --- trunk/doc/Doxyfile.in 2009-09-22 01:29:46 UTC (rev 10453) +++ trunk/doc/Doxyfile.in 2009-09-22 01:38:35 UTC (rev 10454) @@ -38,7 +38,7 @@ # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = ./doc/code +OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/doc/doxygen # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output @@ -584,7 +584,7 @@ # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = ./src +INPUT = @CMAKE_SOURCE_DIR@/src # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |