mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 01:34:25 +00:00 
			
		
		
		
	config: split out versiondef.h from config.h
This avoids recompiling every c file after comitting.
This commit is contained in:
		
				
					committed by
					
						
						Justin M. Keyes
					
				
			
			
				
	
			
			
			
						parent
						
							d2e13d3b3d
						
					
				
				
					commit
					4f92178a75
				
			@@ -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
 | 
				
			||||||
@@ -4033,7 +4033,7 @@ void do_modelines(int flags)
 | 
				
			|||||||
  --entered;
 | 
					  --entered;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#include "nvim/version_defs.h"            /* for version number */
 | 
					#include "nvim/version.h"            /* for version number */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * chk_modeline() - check a single line for a mode string
 | 
					 * chk_modeline() - check a single line for a mode string
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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:" */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,18 @@
 | 
				
			|||||||
#ifndef NVIM_VERSION_H
 | 
					#ifndef NVIM_VERSION_H
 | 
				
			||||||
#define NVIM_VERSION_H
 | 
					#define NVIM_VERSION_H
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					// 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
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,6 +9,8 @@
 | 
				
			|||||||
#define STR_(x) #x
 | 
					#define STR_(x) #x
 | 
				
			||||||
#define STR(x) STR_(x)
 | 
					#define STR(x) STR_(x)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "auto/versiondef.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
// Nvim version identifiers
 | 
					// Nvim version identifiers
 | 
				
			||||||
//
 | 
					//
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user