mirror of
https://github.com/neovim/neovim
synced 2025-07-15 16:51:49 +00:00
refactor(build): make all generated c files headers
There's no "rule" or bad practice or whatever that says we cannot generate c files. it is is just that we have ~20 generated headers and ~2 generated sources and there is nothing in these two generated source files which sets them aparts. Lua bindings are not different from rpc bindings, and pathdef is not different from versiondef. So to simplify build logic and ease the future port to build.zig, streamline the build to only have generated headers, no direct generated .c files. Also "nlua_add_api_functions" had its prototype duplicated twice which defeated the point of having mandatory prototypes (one source of truth).
This commit is contained in:
@ -194,6 +194,6 @@ file(GENERATE
|
||||
INPUT "${PROJECT_BINARY_DIR}/cmake.config/auto/versiondef.h.gen")
|
||||
|
||||
configure_file (
|
||||
"${PROJECT_SOURCE_DIR}/cmake.config/pathdef.c.in"
|
||||
"${PROJECT_BINARY_DIR}/cmake.config/auto/pathdef.c"
|
||||
"${PROJECT_SOURCE_DIR}/cmake.config/pathdef.h.in"
|
||||
"${PROJECT_BINARY_DIR}/cmake.config/auto/pathdef.h"
|
||||
ESCAPE_QUOTES)
|
||||
|
@ -1,4 +1,3 @@
|
||||
#include "${PROJECT_SOURCE_DIR}/src/nvim/vim_defs.h"
|
||||
char *default_vim_dir = "${CMAKE_INSTALL_FULL_DATAROOTDIR}/nvim";
|
||||
char *default_vimruntime_dir = "";
|
||||
char *default_lib_dir = "${CMAKE_INSTALL_FULL_LIBDIR}/nvim";
|
Reference in New Issue
Block a user