]> SALOME platform Git repositories - modules/yacs.git/commitdiff
Salome HOME
Improve make dev_docs step:
authorvsr <vsr@opencascade.com>
Mon, 21 Oct 2013 08:28:53 +0000 (08:28 +0000)
committervsr <vsr@opencascade.com>
Mon, 21 Oct 2013 08:28:53 +0000 (08:28 +0000)
- It does not install anything; only generates output with doxygen
- make install installs output files generated by make dev_docs
- make clean cleans generated files

doc/salome/tui/CMakeLists.txt

index bff14febd211fc31a400278657a5248880232861..0974627e2475336d65c3e4e8304de8d15c98fd4f 100755 (executable)
 SALOME_CONFIGURE_FILE(doxyfile.in doxyfile)
 SALOME_CONFIGURE_FILE(static/header.html.in static/header.html)
 
-ADD_CUSTOM_TARGET(dev_docs ${DOXYGEN_EXECUTABLE} -u
-  COMMAND ${DOXYGEN_EXECUTABLE}
-  COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.remove(r'''${CMAKE_CURRENT_BINARY_DIR}/doxyfile.bak''')"  
-  COMMAND ${PYTHON_EXECUTABLE} -c "import shutil, sys; shutil.rmtree(r'''${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_DOC}/tui/KERNEL''', True); shutil.copytree(r'''${CMAKE_CURRENT_BINARY_DIR}/KERNEL''', r'''${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_DOC}/tui/KERNEL'''); shutil.copy(r'''${CMAKE_CURRENT_SOURCE_DIR}/images/head.png''', r'''${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_DOC}/tui/KERNEL''')" 
-  VERBATIM
-  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-)
+ADD_CUSTOM_TARGET(dev_docs ${DOXYGEN_EXECUTABLE})
 
-# TODO
-# - Stop using shutil.rmtree() to clear installation directory - this is not safe
-#   (as the directory can potentically point to custom location)! Moreover, currently, it remove
-#   the documentation generated with Sphinx (from docutils)!
-# - Redesign dev_docs rule: 'make dev_docs' should generate documentation and 'make install'
-#   should the install it. Other solution: split dev_docs to two steps: dev_docs and install_dev_docs.
+INSTALL(CODE "FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/KERNEL)")
+INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/KERNEL DESTINATION ${SALOME_INSTALL_DOC}/tui)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/head.png DESTINATION ${SALOME_INSTALL_DOC}/tui/KERNEL)
+
+SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES KERNEL)