From a6734844ca88d2a85de6be10b60e75d48f64747f Mon Sep 17 00:00:00 2001 From: Eliseo Martínez Date: Mon, 12 May 2014 15:50:37 +0200 Subject: 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. --- CMakeLists.txt | 4 ++-- Makefile | 4 ++-- config/pathdef.c.in | 2 +- scripts/msgpack-gen.lua | 4 ++-- src/nvim/CMakeLists.txt | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 11e0aaf604..a29d8d6834 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,7 +111,7 @@ if(${LUA_MSGPACK_MISSING}) endif() add_subdirectory(config) -add_subdirectory(src) +add_subdirectory(src/nvim) add_subdirectory(test/includes) 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 # CTest, but it needs a little more work. # 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) diff --git a/Makefile b/Makefile index 6cb7b57369..f55db1d234 100644 --- a/Makefile +++ b/Makefile @@ -60,14 +60,14 @@ deps: | .deps/build/third-party/.ran-cmake touch $@ test: | nvim - +$(SINGLE_MAKE) -C src/testdir + +$(SINGLE_MAKE) -C src/nvim/testdir unittest: | nvim +$(BUILD_CMD) -C build unittest clean: +test -d build && $(BUILD_CMD) -C build clean || true - $(MAKE) -C src/testdir clean + $(MAKE) -C src/nvim/testdir clean distclean: clean rm -rf .deps build diff --git a/config/pathdef.c.in b/config/pathdef.c.in index 6ba5358689..b7b4a980d6 100644 --- a/config/pathdef.c.in +++ b/config/pathdef.c.in @@ -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_vimruntime_dir = (char_u *)""; char_u *all_cflags = (char_u *)"${COMPILER_FLAGS}"; diff --git a/scripts/msgpack-gen.lua b/scripts/msgpack-gen.lua index 28d01e0c37..edf97b8cfd 100644 --- a/scripts/msgpack-gen.lua +++ b/scripts/msgpack-gen.lua @@ -95,11 +95,11 @@ output:write([[ #include #include -#include "os/msgpack_rpc.h" +#include "nvim/os/msgpack_rpc.h" ]]) for i = 1, #headers do - output:write('\n#include "'..headers[i]..'"') + output:write('\n#include "nvim/'..headers[i]..'"') end output:write([[ diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index 7638346abc..a3d1f6ace9 100644 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -1,9 +1,9 @@ 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) 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) # Remove helpers.h from API_HEADERS since it doesn't contain public API -- cgit