cmake: make lua api documentation a target with dependencies

This commit is contained in:
Michael Gehring 2008-06-21 16:59:36 +02:00
parent f231e8496a
commit 15dbc1c887

View file

@ -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})