Ignore warnings from ldoc by default
A while ago, we made errors from ldoc fatal by default. Then a new ldoc release appeared and caused problems for all of our users, because awesome failed to work. This patch reverts the previous fix so that we ignore ldoc warnings by default again. However, to catch ldoc warnings on Travis, another ldoc-building-target is added that fails on warnings. This new target is included in our "check" target. This fixes the intend of issue #1098 ("Users with ldoc version X cannot build awesome"), but it does not actually employ the solution proposed there ("Blacklist those ldoc versions"). Still, since this fixes the intend of the issue, I count it as fixed. Fixes: https://github.com/awesomeWM/awesome/issues/1098 Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
7292be1add
commit
4f1897b256
|
@ -22,6 +22,8 @@ include_directories(
|
|||
${AWESOME_REQUIRED_INCLUDE_DIRS}
|
||||
${AWESOME_OPTIONAL_INCLUDE_DIRS})
|
||||
|
||||
set(CHECK_TARGETS check-integration)
|
||||
|
||||
set(AWE_CONF_FILE_DEFAULT ${BUILD_DIR}/awesomerc.lua)
|
||||
set(AWE_CONF_FILE rc.lua)
|
||||
|
||||
|
@ -272,17 +274,24 @@ if(GENERATE_DOC)
|
|||
# Copy the aliases to the build directory
|
||||
file(COPY ${SOURCE_DIR}/docs/aliases DESTINATION ${BUILD_DIR}/docs)
|
||||
|
||||
# Run ldoc and make it fail if any warnings are generated. The
|
||||
# redirection-magic swaps stdout and stderr and awk exits with a non-zero
|
||||
# status if it sees at least one line of input.
|
||||
# All together, this fails as soon as ldoc prints on stderr.
|
||||
add_custom_target(ldoc ALL
|
||||
COMMAND ${LDOC_EXECUTABLE} . 3>&1 1>&2 2>&3 | awk "{ fail=1 \; print } END { exit fail }"
|
||||
COMMAND ${LDOC_EXECUTABLE} .
|
||||
WORKING_DIRECTORY ${AWE_DOC_DIR}
|
||||
DEPENDS ${AWE_LUA_FILES} ${AWE_MD_FILES} ${BUILD_DIR}/docs/06-appearance.md
|
||||
${BUILD_DIR}/docs/05-awesomerc.md
|
||||
)
|
||||
|
||||
# Run ldoc and make it fail if any warnings are generated. The
|
||||
# redirection-magic swaps stdout and stderr and awk exits with a non-zero
|
||||
# status if it sees at least one line of input.
|
||||
# All together, this fails as soon as ldoc prints on stderr.
|
||||
add_custom_target(check-ldoc-warnings
|
||||
COMMAND ${LDOC_EXECUTABLE} . 3>&1 1>&2 2>&3 | awk "{ fail=1 \; print } END { exit fail }"
|
||||
WORKING_DIRECTORY ${AWE_DOC_DIR}
|
||||
DEPENDS ${AWE_LUA_FILES} ${AWE_MD_FILES} ${BUILD_DIR}/docs/06-appearance.md
|
||||
${BUILD_DIR}/docs/05-awesomerc.md
|
||||
)
|
||||
list(APPEND CHECK_TARGETS check-ldoc-warnings)
|
||||
endif()
|
||||
# }}}
|
||||
|
||||
|
@ -365,7 +374,6 @@ endif()
|
|||
# }}}
|
||||
|
||||
# {{{ Tests
|
||||
set(CHECK_TARGETS check-integration)
|
||||
add_custom_target(check-integration
|
||||
sh -c "CMAKE_BINARY_DIR='${CMAKE_BINARY_DIR}' ${CMAKE_SOURCE_DIR}/tests/run.sh"
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
|
|
Loading…
Reference in New Issue