mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
Introduce nvim namespace: Fix build process.
- Leave src as include dir (for includes to recognize 'nvim/' prefix). - Change subdirectory from src to src/nvim. - Fix msgpack generation. - Fix some other paths to new locations.
This commit is contained in:
@@ -111,7 +111,7 @@ if(${LUA_MSGPACK_MISSING})
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(config)
|
add_subdirectory(config)
|
||||||
add_subdirectory(src)
|
add_subdirectory(src/nvim)
|
||||||
add_subdirectory(test/includes)
|
add_subdirectory(test/includes)
|
||||||
|
|
||||||
find_program(BUSTED_PRG busted)
|
find_program(BUSTED_PRG busted)
|
||||||
@@ -168,5 +168,5 @@ endif()
|
|||||||
# well with the legacy tests. I have a branch that converts them to run under
|
# well with the legacy tests. I have a branch that converts them to run under
|
||||||
# CTest, but it needs a little more work.
|
# CTest, but it needs a little more work.
|
||||||
# add_custom_target(test
|
# add_custom_target(test
|
||||||
# COMMAND ${MAKE_PRG} -C ${CMAKE_CURRENT_SOURCE_DIR}/src/testdir
|
# COMMAND ${MAKE_PRG} -C ${CMAKE_CURRENT_SOURCE_DIR}/src/nvim/testdir
|
||||||
# VIMPROG=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/nvim)
|
# VIMPROG=${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/nvim)
|
||||||
|
4
Makefile
4
Makefile
@@ -60,14 +60,14 @@ deps: | .deps/build/third-party/.ran-cmake
|
|||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
test: | nvim
|
test: | nvim
|
||||||
+$(SINGLE_MAKE) -C src/testdir
|
+$(SINGLE_MAKE) -C src/nvim/testdir
|
||||||
|
|
||||||
unittest: | nvim
|
unittest: | nvim
|
||||||
+$(BUILD_CMD) -C build unittest
|
+$(BUILD_CMD) -C build unittest
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
+test -d build && $(BUILD_CMD) -C build clean || true
|
+test -d build && $(BUILD_CMD) -C build clean || true
|
||||||
$(MAKE) -C src/testdir clean
|
$(MAKE) -C src/nvim/testdir clean
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -rf .deps build
|
rm -rf .deps build
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
#include "${PROJECT_SOURCE_DIR}/src/vim.h"
|
#include "${PROJECT_SOURCE_DIR}/src/nvim/vim.h"
|
||||||
char_u *default_vim_dir = (char_u *)"${CMAKE_INSTALL_PREFIX}/share/vim";
|
char_u *default_vim_dir = (char_u *)"${CMAKE_INSTALL_PREFIX}/share/vim";
|
||||||
char_u *default_vimruntime_dir = (char_u *)"";
|
char_u *default_vimruntime_dir = (char_u *)"";
|
||||||
char_u *all_cflags = (char_u *)"${COMPILER_FLAGS}";
|
char_u *all_cflags = (char_u *)"${COMPILER_FLAGS}";
|
||||||
|
@@ -95,11 +95,11 @@ output:write([[
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <msgpack.h>
|
#include <msgpack.h>
|
||||||
|
|
||||||
#include "os/msgpack_rpc.h"
|
#include "nvim/os/msgpack_rpc.h"
|
||||||
]])
|
]])
|
||||||
|
|
||||||
for i = 1, #headers do
|
for i = 1, #headers do
|
||||||
output:write('\n#include "'..headers[i]..'"')
|
output:write('\n#include "nvim/'..headers[i]..'"')
|
||||||
end
|
end
|
||||||
|
|
||||||
output:write([[
|
output:write([[
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
include(CheckLibraryExists)
|
include(CheckLibraryExists)
|
||||||
|
|
||||||
set(GENERATED_DIR ${PROJECT_BINARY_DIR}/src/auto)
|
set(GENERATED_DIR ${PROJECT_BINARY_DIR}/src/nvim/auto)
|
||||||
set(DISPATCH_GENERATOR ${PROJECT_SOURCE_DIR}/scripts/msgpack-gen.lua)
|
set(DISPATCH_GENERATOR ${PROJECT_SOURCE_DIR}/scripts/msgpack-gen.lua)
|
||||||
file(GLOB API_HEADERS api/*.h)
|
file(GLOB API_HEADERS api/*.h)
|
||||||
set(MSGPACK_RPC_HEADER ${PROJECT_SOURCE_DIR}/src/os/msgpack_rpc.h)
|
set(MSGPACK_RPC_HEADER ${PROJECT_SOURCE_DIR}/src/nvim/os/msgpack_rpc.h)
|
||||||
set(MSGPACK_DISPATCH ${GENERATED_DIR}/msgpack_dispatch.c)
|
set(MSGPACK_DISPATCH ${GENERATED_DIR}/msgpack_dispatch.c)
|
||||||
|
|
||||||
# Remove helpers.h from API_HEADERS since it doesn't contain public API
|
# Remove helpers.h from API_HEADERS since it doesn't contain public API
|
||||||
|
Reference in New Issue
Block a user