diff options
| author | Björn Linse <bjorn.linse@gmail.com> | 2015-03-01 16:59:24 +0100 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2015-03-08 21:54:57 -0400 |
| commit | e0f8eea9f103370be7fd8faefae78482c654cb06 (patch) | |
| tree | ce6c4318f8c909d77597c616469159d0902e3fda /src/nvim/version.c | |
| parent | 4f92178a7597f0478f306086933a163109ee894c (diff) | |
| download | rneovim-e0f8eea9f103370be7fd8faefae78482c654cb06.tar.gz rneovim-e0f8eea9f103370be7fd8faefae78482c654cb06.tar.bz2 rneovim-e0f8eea9f103370be7fd8faefae78482c654cb06.zip | |
version: don't use NVIM_VERSION_* directly outside version.c
This avoids recompiles after commiting.
Diffstat (limited to 'src/nvim/version.c')
| -rw-r--r-- | src/nvim/version.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/nvim/version.c b/src/nvim/version.c index 8357de9f46..474dbf73f8 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -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); |