Use LDoc instead of Luadoc (FS#1006)
Since we are no longer using module(), luadoc no longer understands our modules. With this commit we use LDoc instead which seems more modern. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
43c02c61c5
commit
c87e775e46
|
@ -21,8 +21,6 @@ include_directories(
|
|||
${AWESOME_REQUIRED_INCLUDE_DIRS}
|
||||
${AWESOME_OPTIONAL_INCLUDE_DIRS})
|
||||
|
||||
file(GLOB_RECURSE AWE_LUA_FILES ${BUILD_DIR}/lib/*.lua ${BUILD_DIR}/luadoc/*.lua)
|
||||
|
||||
set(AWE_CONF_FILE_DEFAULT ${BUILD_DIR}/awesomerc.lua)
|
||||
set(AWE_CONF_FILE rc.lua)
|
||||
|
||||
|
@ -230,24 +228,15 @@ endif()
|
|||
# }}}
|
||||
|
||||
# {{{ Lua API Documentation
|
||||
if(GENERATE_LUADOC)
|
||||
|
||||
if(GENERATE_DOC)
|
||||
if(NOT BUILD_DIR STREQUAL SOURCE_DIR)
|
||||
file(MAKE_DIRECTORY ${BUILD_DIR}/lib)
|
||||
endif()
|
||||
|
||||
set(luadoc_c_srcs "")
|
||||
file(GLOB_RECURSE AWE_LUA_FILES ${BUILD_DIR}/lib/*.lua ${BUILD_DIR}/luadoc/*.lua)
|
||||
|
||||
# Generate documentation of lib//0lua
|
||||
file(GLOB_RECURSE lua_lib_files ${BUILD_DIR}/lib/*.lua
|
||||
${SOURCE_DIR}/luadoc/*.lua)
|
||||
foreach(filename ${lua_lib_files})
|
||||
file(RELATIVE_PATH filename ${BUILD_DIR} ${filename})
|
||||
set(luadoc_srcs ${luadoc_srcs} ${filename})
|
||||
endforeach()
|
||||
|
||||
add_custom_target(luadoc ALL
|
||||
COMMAND ${LUADOC_EXECUTABLE} ${luadoc_srcs} -d ${BUILD_DIR}/luadoc --nofiles
|
||||
add_custom_target(ldoc ALL
|
||||
COMMAND ${LDOC_EXECUTABLE} .
|
||||
WORKING_DIRECTORY ${BUILD_DIR}
|
||||
DEPENDS ${AWE_LUA_FILES})
|
||||
endif()
|
||||
|
@ -326,8 +315,8 @@ install(DIRECTORY ${SOURCE_DIR}/themes DESTINATION ${AWESOME_DATA_PATH}
|
|||
PATTERN "*.in" EXCLUDE)
|
||||
install(FILES ${AWE_DOC_FILES} DESTINATION ${AWESOME_DOC_PATH})
|
||||
install(FILES "awesome.desktop" DESTINATION ${AWESOME_XSESSION_PATH})
|
||||
if(GENERATE_LUADOC)
|
||||
install(DIRECTORY ${BUILD_DIR}/luadoc DESTINATION ${AWESOME_DOC_PATH})
|
||||
if(GENERATE_DOC)
|
||||
install(DIRECTORY ${BUILD_DIR}/doc DESTINATION ${AWESOME_DOC_PATH})
|
||||
endif()
|
||||
# }}}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ set(CMAKE_BUILD_TYPE RELEASE)
|
|||
option(WITH_DBUS "build with D-BUS" ON)
|
||||
option(GENERATE_MANPAGES "generate manpages" ON)
|
||||
option(COMPRESS_MANPAGES "compress manpages" ON)
|
||||
option(GENERATE_LUADOC "generate luadoc" ON)
|
||||
option(GENERATE_DOC "generate API documentation" ON)
|
||||
|
||||
# {{{ CFLAGS
|
||||
add_definitions(-std=gnu99 -ggdb3 -rdynamic -fno-strict-aliasing -Wall -Wextra
|
||||
|
@ -54,7 +54,7 @@ a_find_program(XMLTO_EXECUTABLE xmlto FALSE)
|
|||
a_find_program(GZIP_EXECUTABLE gzip FALSE)
|
||||
# lua documentation
|
||||
a_find_program(LUA_EXECUTABLE lua FALSE)
|
||||
a_find_program(LUADOC_EXECUTABLE luadoc FALSE)
|
||||
a_find_program(LDOC_EXECUTABLE ldoc.lua FALSE)
|
||||
# theme graphics
|
||||
a_find_program(CONVERT_EXECUTABLE convert TRUE)
|
||||
# doxygen
|
||||
|
@ -83,10 +83,10 @@ if(GENERATE_MANPAGES)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(GENERATE_LUADOC)
|
||||
if(NOT LUADOC_EXECUTABLE)
|
||||
message(STATUS "Not generating luadoc. Missing: luadoc")
|
||||
set(GENERATE_LUADOC OFF)
|
||||
if(GENERATE_DOC)
|
||||
if(NOT LDOC_EXECUTABLE)
|
||||
message(STATUS "Not generating API documentation. Missing: ldoc")
|
||||
set(GENERATE_DOC OFF)
|
||||
endif()
|
||||
endif()
|
||||
# }}}
|
||||
|
@ -283,6 +283,7 @@ file(GLOB_RECURSE awesome_lua_configure_files RELATIVE ${SOURCE_DIR} ${SOURCE_DI
|
|||
set(AWESOME_CONFIGURE_FILES
|
||||
${awesome_lua_configure_files}
|
||||
config.h.in
|
||||
config.ld.in
|
||||
awesomerc.lua.in
|
||||
awesome-version-internal.h.in
|
||||
awesome.doxygen.in)
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
-- Configuration file for ldoc
|
||||
project='awesome'
|
||||
title='awesome API documentation'
|
||||
description='highly configurable X window manager'
|
||||
--format='markdown' or should it be discount? what is that anyway? how about plain?
|
||||
dir='doc'
|
||||
file={ 'lib/', '@SOURCE_DIR@/luadoc' }
|
Loading…
Reference in New Issue