From ae3eed53d6100598b6d26fe58e3e97541e03f3c1 Mon Sep 17 00:00:00 2001 From: dundargoc Date: Mon, 1 Jan 2024 13:08:56 +0100 Subject: build: various build improvements - remove "ran-" prefix from touch files as it's redundant since the they're already in the directory named `touches`. - Include `contrib` when formatting with `make formatlua`. - Use TARGET_FILE generator expression instead of assuming the executable location. - reuse logic that determines whether to use lua or luajit. - add translations to the `nvim` target. Makefile improvements: - rename variable `CMAKE_PRG` to `CMAKE` to make it more consistent with the builtin `MAKE` variable. - stop propagating flags to generator. Users should use cmake for non-standard use cases. - remove `+` prefix from targets. If the user for whatever reason wants to dry-run a target then they should be able to. --- runtime/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'runtime') diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt index c9655ad9b9..0dbf646702 100644 --- a/runtime/CMakeLists.txt +++ b/runtime/CMakeLists.txt @@ -33,7 +33,7 @@ foreach(PACKAGE ${PACKAGES}) add_custom_command(OUTPUT "${GENERATED_PACKAGE_DIR}/${PACKNAME}/doc/tags" COMMAND ${CMAKE_COMMAND} -E copy_directory ${PACKAGE} ${GENERATED_PACKAGE_DIR}/${PACKNAME} - COMMAND "${PROJECT_BINARY_DIR}/bin/nvim" + COMMAND $ -u NONE -i NONE -e --headless -c "helptags doc" -c quit DEPENDS nvim_bin @@ -67,7 +67,7 @@ add_custom_command(OUTPUT ${GENERATED_HELP_TAGS} COMMAND ${CMAKE_COMMAND} -E remove_directory doc COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/runtime/doc doc - COMMAND "${PROJECT_BINARY_DIR}/bin/nvim" + COMMAND $ -u NONE -i NONE -e --headless -c "helptags ++t doc" -c quit DEPENDS nvim_bin @@ -77,7 +77,7 @@ add_custom_command(OUTPUT ${GENERATED_HELP_TAGS} # TODO: This doesn't work. wait for "nvim -l" to land? add_custom_target(doc_html - COMMAND "${PROJECT_BINARY_DIR}/bin/nvim" + COMMAND $ -V1 -es --clean -c "lua require('scripts.gen_help_html').gen('./build/runtime/doc', './build/doc_html', nil, 'todo_commit_id')" -c "0cq" DEPENDS ${GENERATED_HELP_TAGS} -- cgit