aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2024-01-27 19:10:41 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2024-02-01 12:06:55 +0100
commit4c91194611086916c833d61e28e2f5e689316e83 (patch)
treeb338025023370b019e7d766ecb66d792cc1eba77
parentcc197d04fc36a6ee4219f20772a7b39dd976edfd (diff)
downloadrneovim-4c91194611086916c833d61e28e2f5e689316e83.tar.gz
rneovim-4c91194611086916c833d61e28e2f5e689316e83.tar.bz2
rneovim-4c91194611086916c833d61e28e2f5e689316e83.zip
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.
-rwxr-xr-x.github/scripts/build_universal_macos.sh4
-rw-r--r--.github/workflows/build.yml2
-rw-r--r--.github/workflows/release.yml8
-rw-r--r--CMakeLists.txt2
-rw-r--r--runtime/CMakeLists.txt11
-rwxr-xr-xscripts/genappimage.sh2
-rw-r--r--src/nvim/CMakeLists.txt7
-rw-r--r--test/old/testdir/Makefile3
8 files changed, 18 insertions, 21 deletions
diff --git a/.github/scripts/build_universal_macos.sh b/.github/scripts/build_universal_macos.sh
index 432a275d6d..49de6e2b96 100755
--- a/.github/scripts/build_universal_macos.sh
+++ b/.github/scripts/build_universal_macos.sh
@@ -3,13 +3,13 @@
MACOSX_DEPLOYMENT_TARGET="$(sw_vers -productVersion | cut -f1 -d.)"
export MACOSX_DEPLOYMENT_TARGET
cmake -S cmake.deps -B .deps -G Ninja \
- -D CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} \
+ -D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \
-D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 \
-D CMAKE_FIND_FRAMEWORK=NEVER
cmake --build .deps
cmake -B build -G Ninja \
- -D CMAKE_BUILD_TYPE=${NVIM_BUILD_TYPE} \
+ -D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-D CMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \
-D CMAKE_OSX_ARCHITECTURES=arm64\;x86_64 \
-D ENABLE_LIBINTL=OFF \
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index f1468d2547..5dd53150ea 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -26,7 +26,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- - run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV
+ - run: printf 'CMAKE_BUILD_TYPE=Release\n' >> $GITHUB_ENV
- name: Build universal binary
run: ./.github/scripts/build_universal_macos.sh
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 6452de9036..815e7554cf 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -29,11 +29,11 @@ jobs:
- run: ./.github/scripts/install_deps.sh
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
run: |
- echo 'NVIM_BUILD_TYPE=Release' >> $GITHUB_ENV
+ echo 'CMAKE_BUILD_TYPE=Release' >> $GITHUB_ENV
echo 'APPIMAGE_TAG=latest' >> $GITHUB_ENV
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
run: |
- echo 'NVIM_BUILD_TYPE=RelWithDebInfo' >> $GITHUB_ENV
+ echo 'CMAKE_BUILD_TYPE=RelWithDebInfo' >> $GITHUB_ENV
echo 'APPIMAGE_TAG=nightly' >> $GITHUB_ENV
- name: appimage
run: ./scripts/genappimage.sh ${APPIMAGE_TAG}
@@ -69,9 +69,9 @@ jobs:
- name: Install dependencies
run: ./.github/scripts/install_deps.sh
- if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name != 'nightly')
- run: printf 'NVIM_BUILD_TYPE=Release\n' >> $GITHUB_ENV
+ run: printf 'CMAKE_BUILD_TYPE=Release\n' >> $GITHUB_ENV
- if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.tag_name == 'nightly')
- run: printf 'NVIM_BUILD_TYPE=RelWithDebInfo\n' >> $GITHUB_ENV
+ run: printf 'CMAKE_BUILD_TYPE=RelWithDebInfo\n' >> $GITHUB_ENV
- name: Build universal binary
run: ./.github/scripts/build_universal_macos.sh
- uses: actions/upload-artifact@v4
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 96e1b63ca8..e9c62ba4dc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,6 +39,8 @@ include(Util)
set(FUNCS_DATA ${PROJECT_BINARY_DIR}/funcs_data.mpack)
set(TOUCHES_DIR ${PROJECT_BINARY_DIR}/touches)
+file(GLOB DOCFILES CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/runtime/doc/*.txt)
+
set_directory_properties(PROPERTIES
EP_PREFIX "${DEPS_BUILD_DIR}")
diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
index 0dbf646702..c171fab9e9 100644
--- a/runtime/CMakeLists.txt
+++ b/runtime/CMakeLists.txt
@@ -55,8 +55,6 @@ foreach(PACKAGE ${PACKAGES})
endif()
endforeach()
-file(GLOB DOCFILES CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/runtime/doc/*.txt)
-
set(BUILDDOCFILES)
foreach(DF ${DOCFILES})
get_filename_component(F ${DF} NAME)
@@ -75,15 +73,6 @@ add_custom_command(OUTPUT ${GENERATED_HELP_TAGS}
WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}"
)
-# TODO: This doesn't work. wait for "nvim -l" to land?
-add_custom_target(doc_html
- COMMAND $<TARGET_FILE:nvim_bin>
- -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}
- WORKING_DIRECTORY "${GENERATED_RUNTIME_DIR}/doc"
-)
-
add_custom_target(
nvim_runtime
DEPENDS
diff --git a/scripts/genappimage.sh b/scripts/genappimage.sh
index 0ad5e803e4..e8aac42a9c 100755
--- a/scripts/genappimage.sh
+++ b/scripts/genappimage.sh
@@ -26,7 +26,7 @@ APP_DIR="$APP.AppDir"
########################################################################
# Build and install nvim into the AppImage
-make CMAKE_BUILD_TYPE="${NVIM_BUILD_TYPE}"
+make CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}"
cmake --install build --prefix="$APP_BUILD_DIR/${APP_DIR}/usr"
########################################################################
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt
index 2e26e58c82..f393993894 100644
--- a/src/nvim/CMakeLists.txt
+++ b/src/nvim/CMakeLists.txt
@@ -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)
diff --git a/test/old/testdir/Makefile b/test/old/testdir/Makefile
index b5ca6a17b0..c55e060f5a 100644
--- a/test/old/testdir/Makefile
+++ b/test/old/testdir/Makefile
@@ -121,7 +121,8 @@ CLEAN_FILES := *.out \
.*.swo \
.gdbinit \
$(TMPDIR) \
- del
+ del \
+ $(ROOT)/runtime/doc/.*.swp
clean:
$(RM) -rf $(CLEAN_FILES)