mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 06:58:35 +00:00
version: don't use NVIM_VERSION_* directly outside version.c
This avoids recompiles after commiting.
This commit is contained in:

committed by
Justin M. Keyes

parent
4f92178a75
commit
e0f8eea9f1
@@ -18,10 +18,24 @@
|
||||
#include "nvim/misc2.h"
|
||||
#include "nvim/screen.h"
|
||||
#include "nvim/strings.h"
|
||||
#include "nvim/version_defs.h"
|
||||
|
||||
// version info generated by the build system
|
||||
#include "auto/versiondef.h"
|
||||
|
||||
#define STR_(x) #x
|
||||
#define STR(x) STR_(x)
|
||||
|
||||
// for the startup-screen ( ":intro" command )
|
||||
#define NVIM_VERSION_MEDIUM STR(NVIM_VERSION_MAJOR) "." STR(NVIM_VERSION_MINOR)
|
||||
|
||||
// for the ":version" command and "nvim --version"
|
||||
#define NVIM_VERSION_LONG "NVIM " NVIM_VERSION_MEDIUM "." STR(NVIM_VERSION_PATCH) NVIM_VERSION_PRERELEASE NVIM_VERSION_BUILD
|
||||
|
||||
|
||||
char *Version = VIM_VERSION_SHORT;
|
||||
char *longVersion = NVIM_VERSION_LONG " (compiled " __DATE__ " " __TIME__ ")";
|
||||
char *longVersion = NVIM_VERSION_LONG;
|
||||
char *longVersionWithDate = NVIM_VERSION_LONG " (compiled " __DATE__ " " __TIME__ ")";
|
||||
char *mediumVersion = NVIM_VERSION_MEDIUM;
|
||||
char *version_commit = "Commit: " NVIM_VERSION_COMMIT;
|
||||
char *version_buildtype = "Build type: " NVIM_VERSION_BUILD_TYPE;
|
||||
char *version_cflags = "Compilation: " NVIM_VERSION_CFLAGS;
|
||||
@@ -885,7 +899,7 @@ void list_version(void)
|
||||
{
|
||||
// When adding features here, don't forget to update the list of
|
||||
// internal variables in eval.c!
|
||||
MSG(longVersion);
|
||||
MSG(longVersionWithDate);
|
||||
MSG(version_commit);
|
||||
MSG(version_buildtype);
|
||||
MSG(version_cflags);
|
||||
|
Reference in New Issue
Block a user