build: various fixes

- Consistently use the variable CMAKE_BUILD_TYPE to select build type.
- Remove broken `doc_html` target.
- Remove swap files created by oldtest when cleaning.
- Only rerun `lintdoc` if any documentation files has changed.
This commit is contained in:
dundargoc
2024-01-27 19:10:41 +01:00
committed by dundargoc
parent cc197d04fc
commit 4c91194611
8 changed files with 18 additions and 21 deletions

View File

@@ -954,9 +954,14 @@ add_custom_target(doc-vim DEPENDS ${VIMDOC_FILES})
add_custom_target(doc)
add_dependencies(doc doc-vim doc-eval)
add_custom_target(lintdoc
set(lintdoc_touch ${TOUCHES_DIR}/lintdoc)
add_custom_command(
OUTPUT ${lintdoc_touch}
COMMAND ${CMAKE_COMMAND} -E touch ${lintdoc_touch}
COMMAND ${CMAKE_COMMAND} -E env "VIMRUNTIME=${NVIM_RUNTIME_DIR}"
$<TARGET_FILE:nvim_bin> --clean -l scripts/lintdoc.lua
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
DEPENDS ${DOCFILES}
USES_TERMINAL)
add_custom_target(lintdoc DEPENDS ${lintdoc_touch})
add_dependencies(lintdoc nvim)