mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
cmake: make lua api documentation a target with dependencies
This commit is contained in:
parent
f231e8496a
commit
15dbc1c887
1 changed files with 13 additions and 7 deletions
|
@ -158,14 +158,20 @@ IF(GENERATE_MANPAGES)
|
|||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
# Create luadoc file
|
||||
# TODO: make this a target that depends on LUA_APIDOC_SRCS
|
||||
EXECUTE_PROCESS(COMMAND ${CAT_EXECUTABLE} ${LUA_APIDOC_SRCS}
|
||||
COMMAND ${LUA_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/build-utils/gendoc.lua
|
||||
OUTPUT_FILE ${AWE_LUADOC_FILE}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
# luadoc target
|
||||
ADD_CUSTOM_COMMAND(COMMAND ${CAT_EXECUTABLE} ${LUA_APIDOC_SRCS}
|
||||
| ${LUA_EXECUTABL} ${CMAKE_CURRENT_SOURCE_DIR}/build-utils/gendoc.lua
|
||||
> ${AWE_LUADOC_FILE}
|
||||
OUTPUT ${AWE_LUADOC_FILE}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
DEPENDS ${LUA_APIDOC_SRCS}
|
||||
COMMENT "Generating Lua API documentation."
|
||||
VERBATIM)
|
||||
|
||||
ADD_CUSTOM_TARGET(luadoc DEPENDS ${AWE_LUADOC_FILE})
|
||||
# TODO: only awesome.5 should depend on apidocgen.txt
|
||||
ADD_DEPENDENCIES(${PROJECT_AWE_NAME} luadoc)
|
||||
|
||||
# TODO: awesome.5 should depend on apidocgen.txt
|
||||
FOREACH(txtfile ${AWE_MAN_SRCS})
|
||||
STRING(REGEX REPLACE ".txt\$" ".xml" xmlfile ${txtfile})
|
||||
STRING(REGEX REPLACE ".xml\$" ".gz" gzipman ${xmlfile})
|
||||
|
|
Loading…
Reference in a new issue