mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge #2081 'avoid spurious rebuilds from git operations'
This commit is contained in:
commit
927ff6f326
@ -126,7 +126,6 @@ src/nvim/undo.h
|
|||||||
src/nvim/undo_defs.h
|
src/nvim/undo_defs.h
|
||||||
src/nvim/version.c
|
src/nvim/version.c
|
||||||
src/nvim/version.h
|
src/nvim/version.h
|
||||||
src/nvim/version_defs.h
|
|
||||||
src/nvim/vim.h
|
src/nvim/vim.h
|
||||||
src/nvim/window.c
|
src/nvim/window.c
|
||||||
src/nvim/window.h
|
src/nvim/window.h
|
||||||
|
@ -79,6 +79,12 @@ configure_file (
|
|||||||
"${PROJECT_BINARY_DIR}/config/auto/config.h"
|
"${PROJECT_BINARY_DIR}/config/auto/config.h"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# generate version definitions
|
||||||
|
configure_file (
|
||||||
|
"${PROJECT_SOURCE_DIR}/config/versiondef.h.in"
|
||||||
|
"${PROJECT_BINARY_DIR}/config/auto/versiondef.h"
|
||||||
|
)
|
||||||
|
|
||||||
# generate pathdef.c
|
# generate pathdef.c
|
||||||
find_program(WHOAMI_PROG whoami)
|
find_program(WHOAMI_PROG whoami)
|
||||||
find_program(HOSTNAME_PROG hostname)
|
find_program(HOSTNAME_PROG hostname)
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
#define NVIM_VERSION_MAJOR @NVIM_VERSION_MAJOR@
|
#ifndef AUTO_CONFIG_H
|
||||||
#define NVIM_VERSION_MINOR @NVIM_VERSION_MINOR@
|
#define AUTO_CONFIG_H
|
||||||
#define NVIM_VERSION_PATCH @NVIM_VERSION_PATCH@
|
|
||||||
#define NVIM_VERSION_PRERELEASE "@NVIM_VERSION_PRERELEASE@"
|
|
||||||
#define NVIM_VERSION_BUILD "@NVIM_VERSION_BUILD@"
|
|
||||||
#define NVIM_VERSION_COMMIT "@NVIM_VERSION_COMMIT@"
|
|
||||||
#define NVIM_VERSION_CFLAGS "@NVIM_VERSION_CFLAGS@"
|
|
||||||
#define NVIM_VERSION_BUILD_TYPE "@NVIM_VERSION_BUILD_TYPE@"
|
|
||||||
|
|
||||||
#cmakedefine DEBUG
|
#cmakedefine DEBUG
|
||||||
|
|
||||||
@ -72,3 +66,5 @@
|
|||||||
#define FEAT_BROWSE
|
#define FEAT_BROWSE
|
||||||
#define FEAT_CSCOPE
|
#define FEAT_CSCOPE
|
||||||
#define FEAT_MOUSE
|
#define FEAT_MOUSE
|
||||||
|
|
||||||
|
#endif // AUTO_CONFIG_H
|
||||||
|
13
config/versiondef.h.in
Normal file
13
config/versiondef.h.in
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#ifndef AUTO_VERSIONDEF_H
|
||||||
|
#define AUTO_VERSIONDEF_H
|
||||||
|
|
||||||
|
#define NVIM_VERSION_MAJOR @NVIM_VERSION_MAJOR@
|
||||||
|
#define NVIM_VERSION_MINOR @NVIM_VERSION_MINOR@
|
||||||
|
#define NVIM_VERSION_PATCH @NVIM_VERSION_PATCH@
|
||||||
|
#define NVIM_VERSION_PRERELEASE "@NVIM_VERSION_PRERELEASE@"
|
||||||
|
#define NVIM_VERSION_BUILD "@NVIM_VERSION_BUILD@"
|
||||||
|
#define NVIM_VERSION_COMMIT "@NVIM_VERSION_COMMIT@"
|
||||||
|
#define NVIM_VERSION_CFLAGS "@NVIM_VERSION_CFLAGS@"
|
||||||
|
#define NVIM_VERSION_BUILD_TYPE "@NVIM_VERSION_BUILD_TYPE@"
|
||||||
|
|
||||||
|
#endif // AUTO_VERSIONDEF_H
|
@ -70,6 +70,7 @@
|
|||||||
#include "nvim/syntax.h"
|
#include "nvim/syntax.h"
|
||||||
#include "nvim/ui.h"
|
#include "nvim/ui.h"
|
||||||
#include "nvim/undo.h"
|
#include "nvim/undo.h"
|
||||||
|
#include "nvim/version.h"
|
||||||
#include "nvim/window.h"
|
#include "nvim/window.h"
|
||||||
#include "nvim/os/os.h"
|
#include "nvim/os/os.h"
|
||||||
#include "nvim/os/time.h"
|
#include "nvim/os/time.h"
|
||||||
@ -4033,8 +4034,6 @@ void do_modelines(int flags)
|
|||||||
--entered;
|
--entered;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "nvim/version_defs.h" /* for version number */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* chk_modeline() - check a single line for a mode string
|
* chk_modeline() - check a single line for a mode string
|
||||||
* Return FAIL if an error encountered.
|
* Return FAIL if an error encountered.
|
||||||
|
@ -351,7 +351,6 @@ typedef enum {
|
|||||||
* The reason to use this table anyway is for very quick access to the
|
* The reason to use this table anyway is for very quick access to the
|
||||||
* variables with the VV_ defines.
|
* variables with the VV_ defines.
|
||||||
*/
|
*/
|
||||||
#include "nvim/version_defs.h"
|
|
||||||
|
|
||||||
/* values for vv_flags: */
|
/* values for vv_flags: */
|
||||||
#define VV_COMPAT 1 /* compatible, also used without "v:" */
|
#define VV_COMPAT 1 /* compatible, also used without "v:" */
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
#include "nvim/vim.h"
|
#include "nvim/vim.h"
|
||||||
#include "nvim/ascii.h"
|
#include "nvim/ascii.h"
|
||||||
#include "nvim/version_defs.h"
|
|
||||||
#include "nvim/ex_cmds.h"
|
#include "nvim/ex_cmds.h"
|
||||||
#include "nvim/buffer.h"
|
#include "nvim/buffer.h"
|
||||||
#include "nvim/charset.h"
|
#include "nvim/charset.h"
|
||||||
@ -64,6 +63,7 @@
|
|||||||
#include "nvim/tempfile.h"
|
#include "nvim/tempfile.h"
|
||||||
#include "nvim/ui.h"
|
#include "nvim/ui.h"
|
||||||
#include "nvim/undo.h"
|
#include "nvim/undo.h"
|
||||||
|
#include "nvim/version.h"
|
||||||
#include "nvim/window.h"
|
#include "nvim/window.h"
|
||||||
#include "nvim/os/os.h"
|
#include "nvim/os/os.h"
|
||||||
#include "nvim/os/shell.h"
|
#include "nvim/os/shell.h"
|
||||||
@ -1708,7 +1708,7 @@ static void do_viminfo(FILE *fp_in, FILE *fp_out, int flags)
|
|||||||
if (fp_out != NULL) {
|
if (fp_out != NULL) {
|
||||||
/* Write the info: */
|
/* Write the info: */
|
||||||
fprintf(fp_out, _("# This viminfo file was generated by Nvim %s.\n"),
|
fprintf(fp_out, _("# This viminfo file was generated by Nvim %s.\n"),
|
||||||
NVIM_VERSION_MEDIUM);
|
mediumVersion);
|
||||||
fputs(_("# You may edit it if you're careful!\n\n"), fp_out);
|
fputs(_("# You may edit it if you're careful!\n\n"), fp_out);
|
||||||
fputs(_("# Value of 'encoding' when this file was written\n"), fp_out);
|
fputs(_("# Value of 'encoding' when this file was written\n"), fp_out);
|
||||||
fprintf(fp_out, "*encoding=%s\n\n", p_enc);
|
fprintf(fp_out, "*encoding=%s\n\n", p_enc);
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#ifdef HAVE_LOCALE_H
|
#ifdef HAVE_LOCALE_H
|
||||||
# include <locale.h>
|
# include <locale.h>
|
||||||
#endif
|
#endif
|
||||||
#include "nvim/version_defs.h"
|
#include "nvim/version.h"
|
||||||
#include "nvim/ex_cmds2.h"
|
#include "nvim/ex_cmds2.h"
|
||||||
#include "nvim/buffer.h"
|
#include "nvim/buffer.h"
|
||||||
#include "nvim/charset.h"
|
#include "nvim/charset.h"
|
||||||
|
@ -967,10 +967,6 @@ EXTERN int wild_menu_showing INIT(= 0);
|
|||||||
|
|
||||||
EXTERN char breakat_flags[256]; /* which characters are in 'breakat' */
|
EXTERN char breakat_flags[256]; /* which characters are in 'breakat' */
|
||||||
|
|
||||||
/* these are in version.c */
|
|
||||||
extern char *Version;
|
|
||||||
extern char *longVersion;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Some file names are stored in pathdef.c, which is generated from the
|
* Some file names are stored in pathdef.c, which is generated from the
|
||||||
* Makefile to make their value depend on the Makefile.
|
* Makefile to make their value depend on the Makefile.
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#ifdef HAVE_LOCALE_H
|
#ifdef HAVE_LOCALE_H
|
||||||
# include <locale.h>
|
# include <locale.h>
|
||||||
#endif
|
#endif
|
||||||
#include "nvim/version_defs.h"
|
|
||||||
#include "nvim/hardcopy.h"
|
#include "nvim/hardcopy.h"
|
||||||
#include "nvim/buffer.h"
|
#include "nvim/buffer.h"
|
||||||
#include "nvim/charset.h"
|
#include "nvim/charset.h"
|
||||||
@ -42,6 +41,7 @@
|
|||||||
#include "nvim/strings.h"
|
#include "nvim/strings.h"
|
||||||
#include "nvim/syntax.h"
|
#include "nvim/syntax.h"
|
||||||
#include "nvim/ui.h"
|
#include "nvim/ui.h"
|
||||||
|
#include "nvim/version.h"
|
||||||
#include "nvim/tempfile.h"
|
#include "nvim/tempfile.h"
|
||||||
#include "nvim/os/os.h"
|
#include "nvim/os/os.h"
|
||||||
#include "nvim/os/input.h"
|
#include "nvim/os/input.h"
|
||||||
@ -2440,7 +2440,7 @@ int mch_print_begin(prt_settings_T *psettings)
|
|||||||
STRCPY(buffer, "Unknown");
|
STRCPY(buffer, "Unknown");
|
||||||
}
|
}
|
||||||
prt_dsc_textline("For", buffer);
|
prt_dsc_textline("For", buffer);
|
||||||
prt_dsc_textline("Creator", NVIM_VERSION_LONG);
|
prt_dsc_textline("Creator", longVersion);
|
||||||
/* Note: to ensure Clean8bit I don't think we can use LC_TIME */
|
/* Note: to ensure Clean8bit I don't think we can use LC_TIME */
|
||||||
now = time(NULL);
|
now = time(NULL);
|
||||||
p_time = ctime(&now);
|
p_time = ctime(&now);
|
||||||
|
@ -70,6 +70,7 @@
|
|||||||
#include "nvim/spell.h"
|
#include "nvim/spell.h"
|
||||||
#include "nvim/strings.h"
|
#include "nvim/strings.h"
|
||||||
#include "nvim/ui.h"
|
#include "nvim/ui.h"
|
||||||
|
#include "nvim/version.h"
|
||||||
#include "nvim/tempfile.h"
|
#include "nvim/tempfile.h"
|
||||||
#include "nvim/undo.h"
|
#include "nvim/undo.h"
|
||||||
#include "nvim/window.h"
|
#include "nvim/window.h"
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#include "nvim/vim.h"
|
#include "nvim/vim.h"
|
||||||
#include "nvim/ascii.h"
|
#include "nvim/ascii.h"
|
||||||
#include "nvim/version_defs.h"
|
#include "nvim/version.h"
|
||||||
#include "nvim/misc1.h"
|
#include "nvim/misc1.h"
|
||||||
#include "nvim/charset.h"
|
#include "nvim/charset.h"
|
||||||
#include "nvim/cursor.h"
|
#include "nvim/cursor.h"
|
||||||
|
@ -18,10 +18,24 @@
|
|||||||
#include "nvim/misc2.h"
|
#include "nvim/misc2.h"
|
||||||
#include "nvim/screen.h"
|
#include "nvim/screen.h"
|
||||||
#include "nvim/strings.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 *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_commit = "Commit: " NVIM_VERSION_COMMIT;
|
||||||
char *version_buildtype = "Build type: " NVIM_VERSION_BUILD_TYPE;
|
char *version_buildtype = "Build type: " NVIM_VERSION_BUILD_TYPE;
|
||||||
char *version_cflags = "Compilation: " NVIM_VERSION_CFLAGS;
|
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
|
// When adding features here, don't forget to update the list of
|
||||||
// internal variables in eval.c!
|
// internal variables in eval.c!
|
||||||
MSG(longVersion);
|
MSG(longVersionWithDate);
|
||||||
MSG(version_commit);
|
MSG(version_commit);
|
||||||
MSG(version_buildtype);
|
MSG(version_buildtype);
|
||||||
MSG(version_cflags);
|
MSG(version_cflags);
|
||||||
|
@ -1,6 +1,23 @@
|
|||||||
#ifndef NVIM_VERSION_H
|
#ifndef NVIM_VERSION_H
|
||||||
#define NVIM_VERSION_H
|
#define NVIM_VERSION_H
|
||||||
|
|
||||||
|
// defined in version.c
|
||||||
|
extern char* Version;
|
||||||
|
extern char* mediumVersion;
|
||||||
|
extern char* longVersion;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Vim version number, name, etc. Patchlevel is defined in version.c.
|
||||||
|
//
|
||||||
|
#define VIM_VERSION_MAJOR 7
|
||||||
|
#define VIM_VERSION_MINOR 4
|
||||||
|
#define VIM_VERSION_100 (VIM_VERSION_MAJOR * 100 + VIM_VERSION_MINOR)
|
||||||
|
|
||||||
|
// used for the runtime directory name
|
||||||
|
#define VIM_VERSION_NODOT "vim74"
|
||||||
|
// swap file compatibility (max. length is 6 chars)
|
||||||
|
#define VIM_VERSION_SHORT "7.4"
|
||||||
|
|
||||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||||
# include "version.h.generated.h"
|
# include "version.h.generated.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,56 +0,0 @@
|
|||||||
#ifndef NVIM_VERSION_DEFS_H
|
|
||||||
#define NVIM_VERSION_DEFS_H
|
|
||||||
|
|
||||||
// VIM - Vi IMproved by Bram Moolenaar
|
|
||||||
//
|
|
||||||
// Do ":help uganda" in Vim to read copying and usage conditions.
|
|
||||||
// Do ":help credits" in Vim to see a list of people who contributed.
|
|
||||||
|
|
||||||
#define STR_(x) #x
|
|
||||||
#define STR(x) STR_(x)
|
|
||||||
|
|
||||||
//
|
|
||||||
// Nvim version identifiers
|
|
||||||
//
|
|
||||||
#ifndef NVIM_VERSION_MAJOR
|
|
||||||
#define NVIM_VERSION_MAJOR 0
|
|
||||||
#endif
|
|
||||||
#ifndef NVIM_VERSION_MINOR
|
|
||||||
#define NVIM_VERSION_MINOR 0
|
|
||||||
#endif
|
|
||||||
#ifndef NVIM_VERSION_PATCH
|
|
||||||
#define NVIM_VERSION_PATCH 0
|
|
||||||
#endif
|
|
||||||
#ifndef NVIM_VERSION_PRERELEASE
|
|
||||||
#define NVIM_VERSION_PRERELEASE "?"
|
|
||||||
#endif
|
|
||||||
#ifndef NVIM_VERSION_BUILD
|
|
||||||
#define NVIM_VERSION_BUILD "?"
|
|
||||||
#endif
|
|
||||||
#ifndef NVIM_VERSION_COMMIT
|
|
||||||
#define NVIM_VERSION_COMMIT "?"
|
|
||||||
#endif
|
|
||||||
#ifndef NVIM_VERSION_CFLAGS
|
|
||||||
#define NVIM_VERSION_CFLAGS "?"
|
|
||||||
#endif
|
|
||||||
#ifndef NVIM_VERSION_BUILD_TYPE
|
|
||||||
#define NVIM_VERSION_BUILD_TYPE "?"
|
|
||||||
#endif
|
|
||||||
// for the startup-screen
|
|
||||||
#define NVIM_VERSION_MEDIUM STR(NVIM_VERSION_MAJOR) "." STR(NVIM_VERSION_MINOR)
|
|
||||||
// for the ":version" command and "nvim -h"
|
|
||||||
#define NVIM_VERSION_LONG "NVIM " NVIM_VERSION_MEDIUM "." STR(NVIM_VERSION_PATCH) NVIM_VERSION_PRERELEASE NVIM_VERSION_BUILD
|
|
||||||
|
|
||||||
//
|
|
||||||
// Vim version number, name, etc. Patchlevel is defined in version.c.
|
|
||||||
//
|
|
||||||
#define VIM_VERSION_MAJOR 7
|
|
||||||
#define VIM_VERSION_MINOR 4
|
|
||||||
#define VIM_VERSION_100 (VIM_VERSION_MAJOR * 100 + VIM_VERSION_MINOR)
|
|
||||||
|
|
||||||
// used for the runtime directory name
|
|
||||||
#define VIM_VERSION_NODOT "vim74"
|
|
||||||
// swap file compatibility (max. length is 6 chars)
|
|
||||||
#define VIM_VERSION_SHORT "7.4"
|
|
||||||
|
|
||||||
#endif // NVIM_VERSION_DEFS_H
|
|
Loading…
Reference in New Issue
Block a user