Revision: 9443 https://osdn.net/projects/ttssh2/scm/svn/commits/9443 Author: zmatsuo Date: 2021-09-22 01:07:50 +0900 (Wed, 22 Sep 2021) Log Message: ----------- global, doxygen を cmakeスクリプトから起動するようにした Modified Paths: -------------- trunk/doc_internal/CMakeLists.txt trunk/doc_internal/build.bat trunk/doc_internal/build.sh trunk/gtags_update.sh Added Paths: ----------- trunk/doc_internal/doxygen.cmake trunk/doc_internal/global.cmake trunk/gtags_update.cmake -------------- next part -------------- Modified: trunk/doc_internal/CMakeLists.txt =================================================================== --- trunk/doc_internal/CMakeLists.txt 2021-09-21 16:07:39 UTC (rev 9442) +++ trunk/doc_internal/CMakeLists.txt 2021-09-21 16:07:50 UTC (rev 9443) @@ -6,8 +6,7 @@ else() add_custom_target( doxygen - ${DOXYGEN_EXECUTABLE} Doxyfile - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/doxygen + COMMAND ${CMAKE_COMMAND} -P doxygen.cmake ) set_target_properties( @@ -24,13 +23,9 @@ if(("${GTAGS}" STREQUAL "GTAGS-NOTFOUND") OR ("${HTAGS}" STREQUAL "HTAGS-NOTFOUND")) message(warning "global not found") else() - message("${HTAGS} -ans --tabs 4 -F -d ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/global") add_custom_target( global - COMMAND bash ./gtags_update.sh - COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_SOURCE_DIR}/global - COMMAND ${HTAGS} -ans --tabs 4 -F -d ${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_SOURCE_DIR}/global - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/.. + COMMAND ${CMAKE_COMMAND} -P global.cmake ) set_target_properties( Modified: trunk/doc_internal/build.bat =================================================================== --- trunk/doc_internal/build.bat 2021-09-21 16:07:39 UTC (rev 9442) +++ trunk/doc_internal/build.bat 2021-09-21 16:07:50 UTC (rev 9443) @@ -1,4 +1,5 @@ cd /d %~dp0 -path c:\cygwin64\bin;%PATH% -bash build.sh +call ..\ci_scripts\find_cmake.bat +"%CMAKE_COMMAND%" -P doxygen.cmake +"%CMAKE_COMMAND%" -P global.cmake pause Modified: trunk/doc_internal/build.sh =================================================================== --- trunk/doc_internal/build.sh 2021-09-21 16:07:39 UTC (rev 9442) +++ trunk/doc_internal/build.sh 2021-09-21 16:07:50 UTC (rev 9443) @@ -1,5 +1,5 @@ # doxygen -(cd doxygen; doxygen Doxyfile) +cmake -P doxygen.cmake # global -(cd ..; ./gtags_update.sh; htags -ans --tabs 4 -F; mv HTML/* doc_internal/global) +cmake -P global.cmake Added: trunk/doc_internal/doxygen.cmake =================================================================== --- trunk/doc_internal/doxygen.cmake (rev 0) +++ trunk/doc_internal/doxygen.cmake 2021-09-21 16:07:50 UTC (rev 9443) @@ -0,0 +1,7 @@ +find_program(DOXYGEN Doxygen) +message("DOXYGEN=${DOXYGEN}") + +execute_process( + COMMAND ${DOXYGEN} Doxyfile + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/doxygen + ) Added: trunk/doc_internal/global.cmake =================================================================== --- trunk/doc_internal/global.cmake (rev 0) +++ trunk/doc_internal/global.cmake 2021-09-21 16:07:50 UTC (rev 9443) @@ -0,0 +1,18 @@ + +find_program(HTAGS htags) +message("HTAGS=${HTAGS}") + +file(REMOVE_RECURSE global) + +execute_process( + COMMAND ${CMAKE_COMMAND} -P gtags_update.cmake + WORKING_DIRECTORY ".." + ) + +execute_process( + COMMAND ${HTAGS} -ans --tabs 4 -F + WORKING_DIRECTORY ".." + ) + +file(MAKE_DIRECTORY global) +file(RENAME ../HTML global/HTML) Added: trunk/gtags_update.cmake =================================================================== --- trunk/gtags_update.cmake (rev 0) +++ trunk/gtags_update.cmake 2021-09-21 16:07:50 UTC (rev 9443) @@ -0,0 +1,30 @@ +#!/usr/bin/env cmake -P +find_program(FIND find + HINTS C:/cygwin64/bin + HINTS C:/cygwin/bin + HINTS C:/msys64/usr/bin + ) +find_program(GREP grep + HINTS C:/cygwin64/bin + HINTS C:/cygwin/bin + HINTS C:/msys64/usr/bin + ) +find_program(GTAGS gtags) +message("FIND=${FIND}") +message("GREP=${GREP}") +message("GTAGS=${GTAGS}") + +execute_process( + COMMAND ${FIND} teraterm TTProxy TTX* ttssh2 -type f -name "*.c" -o -name "*.cpp" -o -name "*.h" + COMMAND ${GREP} -v Release + COMMAND ${GREP} -v Debug + COMMAND ${GREP} -v .vs + COMMAND ${GREP} -v build + OUTPUT_FILE gtags.files + WORKING_DIRECTORY "." + ) +execute_process( + COMMAND ${GTAGS} -f gtags.files + ) +# see doc_internal/readme.md + Modified: trunk/gtags_update.sh =================================================================== --- trunk/gtags_update.sh 2021-09-21 16:07:39 UTC (rev 9442) +++ trunk/gtags_update.sh 2021-09-21 16:07:50 UTC (rev 9443) @@ -1,3 +1,2 @@ -/usr/bin/find teraterm TTProxy TTX* ttssh2 -type f -name "*.c" -o -name "*.cpp" -o -name "*.h" | grep -v Release | grep -v .vs | grep -v Debug | grep -v build > gtags.files -gtags -f gtags.files +cmake -P gtags_update.cmake # see doc_internal/readme.md