Module: kamailio
Branch: master
Commit: 6f54793ebbd86f898be749f9e6b00274ccb1f631
URL:
https://github.com/kamailio/kamailio/commit/6f54793ebbd86f898be749f9e6b0027…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-12-17T19:15:34+01:00
cmake/modules-docs.cmake: added target to generate readme for modules
- e.g., make acc_readme
---
Modified: cmake/modules-docs.cmake
---
Diff:
https://github.com/kamailio/kamailio/commit/6f54793ebbd86f898be749f9e6b0027…
Patch:
https://github.com/kamailio/kamailio/commit/6f54793ebbd86f898be749f9e6b0027…
---
diff --git a/cmake/modules-docs.cmake b/cmake/modules-docs.cmake
index 53beeae6fb9..3084632ade8 100644
--- a/cmake/modules-docs.cmake
+++ b/cmake/modules-docs.cmake
@@ -87,6 +87,11 @@ else()
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${MODULE_NAME}/${MODULE_NAME}.txt
)
+ add_custom_target(
+ ${MODULE_NAME}_readme
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${MODULE_NAME}/README
+ )
+
add_custom_target(
${MODULE_NAME}_doc_html DEPENDS ${DOCS_OUTPUT_DIR}/${MODULE_NAME}.html
)
@@ -117,6 +122,16 @@ else()
"Generating text documentation with xsltproc and lynx for
${MODULE_NAME}"
)
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${MODULE_NAME}/README
+ COMMAND
+ ${CMAKE_COMMAND} -E copy
+ ${CMAKE_CURRENT_BINARY_DIR}/${MODULE_NAME}/${MODULE_NAME}.txt
+ ${CMAKE_CURRENT_SOURCE_DIR}/${MODULE_NAME}/README
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${MODULE_NAME}/${MODULE_NAME}.txt
+ COMMENT "Generating README file for module ${MODULE_NAME}"
+ )
+
add_custom_command(
OUTPUT ${DOCS_OUTPUT_DIR}/${MODULE_NAME}.html
COMMAND
@@ -145,6 +160,5 @@ else()
OPTIONAL
)
endif()
-
endfunction()
endif()