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. --- src/nvim/CMakeLists.txt | 4 ++-- src/nvim/po/CMakeLists.txt | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index 4f9edad6a8..b1ee3d93db 100644 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -3,12 +3,12 @@ add_library(main_lib INTERFACE) # Internally we need to make a distinction between "nvim without runtime files" # (nvim_bin) and "nvim with runtime files" (nvim). add_executable(nvim_bin EXCLUDE_FROM_ALL) -set_target_properties(nvim_bin PROPERTIES OUTPUT_NAME nvim) set_target_properties(nvim_bin PROPERTIES EXPORT_COMPILE_COMMANDS ON - ENABLE_EXPORTS TRUE) + ENABLE_EXPORTS TRUE + OUTPUT_NAME nvim) #------------------------------------------------------------------------------- # Dependencies diff --git a/src/nvim/po/CMakeLists.txt b/src/nvim/po/CMakeLists.txt index a4c95df3f1..6c2008926a 100644 --- a/src/nvim/po/CMakeLists.txt +++ b/src/nvim/po/CMakeLists.txt @@ -182,6 +182,7 @@ if(HAVE_WORKING_LIBINTL AND GETTEXT_FOUND AND XGETTEXT_PRG AND ICONV_PRG) BuildMo(${LANGUAGE}) endforeach() - add_custom_target(nvim_translations ALL DEPENDS ${LANGUAGE_MO_FILES}) + add_custom_target(nvim_translations DEPENDS ${LANGUAGE_MO_FILES}) add_custom_target(update-po DEPENDS ${UPDATE_PO_TARGETS}) + add_dependencies(nvim nvim_translations) endif() -- cgit