mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 12:00:17 +01:00
all: merge branch 'th/version-macros'
https://github.com/NetworkManager/NetworkManager/pull/61
This commit is contained in:
commit
b411b54e27
12 changed files with 36 additions and 18 deletions
|
|
@ -9,8 +9,7 @@ examples_C_glib_cppflags = \
|
|||
-I$(top_builddir)/libnm-core \
|
||||
-I$(top_srcdir)/libnm \
|
||||
-I$(top_builddir)/libnm \
|
||||
$(GLIB_CFLAGS) \
|
||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE
|
||||
$(GLIB_CFLAGS)
|
||||
|
||||
examples_C_glib_cppflags_gdbus = $(examples_C_glib_cppflags)
|
||||
examples_C_glib_cppflags_libnm = $(examples_C_glib_cppflags)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
AC_PREREQ([2.63])
|
||||
|
||||
dnl The NM version number
|
||||
dnl
|
||||
dnl XXX: When incrementing version also:
|
||||
dnl - add corresponding NM_VERSION_x_y_z macros in
|
||||
dnl "shared/nm-version-macros.h.in"
|
||||
dnl - update number in meson.build
|
||||
m4_define([nm_major_version], [1])
|
||||
m4_define([nm_minor_version], [11])
|
||||
m4_define([nm_micro_version], [1])
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ GTKDOC_CFLAGS = \
|
|||
-I$(top_builddir)/libnm-util \
|
||||
-I$(top_srcdir)/libnm-glib \
|
||||
-I$(top_builddir)/libnm-glib \
|
||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||
-DNM_VERSION_MIN_REQUIRED=NM_VERSION_0_9_8 \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(DBUS_CFLAGS)
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ extra_files =
|
|||
# if $(DOC_MODULE).types is non-empty.
|
||||
GTKDOC_CFLAGS = \
|
||||
-I$(top_srcdir)/libnm-util \
|
||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||
-DNM_VERSION_MIN_REQUIRED=NM_VERSION_0_9_8 \
|
||||
$(GLIB_CFLAGS) \
|
||||
$(DBUS_CFLAGS)
|
||||
|
|
|
|||
|
|
@ -71,7 +71,6 @@ GTKDOC_CFLAGS = \
|
|||
-I$(top_builddir)/libnm-core \
|
||||
-I$(top_srcdir)/libnm \
|
||||
-I$(top_builddir)/libnm \
|
||||
-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
|
||||
-DNM_VERSION_MIN_REQUIRED=NM_VERSION_0_9_8 \
|
||||
$(GLIB_CFLAGS)
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,5 @@ foreach example: examples
|
|||
[example[0] + '.c'] + example[1],
|
||||
include_directories: example[2],
|
||||
dependencies: [nm_core_dep] + example[3],
|
||||
c_args: '-DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE'
|
||||
)
|
||||
endforeach
|
||||
|
|
|
|||
|
|
@ -29,17 +29,17 @@
|
|||
|
||||
#if !defined (NM_VERSION_MIN_REQUIRED) || (NM_VERSION_MIN_REQUIRED == 0)
|
||||
# undef NM_VERSION_MIN_REQUIRED
|
||||
# define NM_VERSION_MIN_REQUIRED (NM_VERSION_CUR_STABLE)
|
||||
# define NM_VERSION_MIN_REQUIRED (NM_API_VERSION)
|
||||
#endif
|
||||
|
||||
#if !defined (NM_VERSION_MAX_ALLOWED) || (NM_VERSION_MAX_ALLOWED == 0)
|
||||
# undef NM_VERSION_MAX_ALLOWED
|
||||
# define NM_VERSION_MAX_ALLOWED (NM_VERSION_CUR_STABLE)
|
||||
# define NM_VERSION_MAX_ALLOWED (NM_API_VERSION)
|
||||
#endif
|
||||
|
||||
/* sanity checks */
|
||||
#if NM_VERSION_MIN_REQUIRED > NM_VERSION_NEXT_STABLE
|
||||
#error "NM_VERSION_MIN_REQUIRED must be <= NM_VERSION_NEXT_STABLE"
|
||||
#if NM_VERSION_MIN_REQUIRED > NM_API_VERSION
|
||||
#error "NM_VERSION_MIN_REQUIRED must be <= NM_API_VERSION"
|
||||
#endif
|
||||
#if NM_VERSION_MAX_ALLOWED < NM_VERSION_MIN_REQUIRED
|
||||
#error "NM_VERSION_MAX_ALLOWED must be >= NM_VERSION_MIN_REQUIRED"
|
||||
|
|
|
|||
|
|
@ -29,17 +29,17 @@
|
|||
|
||||
#if !defined (NM_VERSION_MIN_REQUIRED) || (NM_VERSION_MIN_REQUIRED == 0)
|
||||
# undef NM_VERSION_MIN_REQUIRED
|
||||
# define NM_VERSION_MIN_REQUIRED (NM_VERSION_CUR_STABLE)
|
||||
# define NM_VERSION_MIN_REQUIRED (NM_API_VERSION)
|
||||
#endif
|
||||
|
||||
#if !defined (NM_VERSION_MAX_ALLOWED) || (NM_VERSION_MAX_ALLOWED == 0)
|
||||
# undef NM_VERSION_MAX_ALLOWED
|
||||
# define NM_VERSION_MAX_ALLOWED (NM_VERSION_CUR_STABLE)
|
||||
# define NM_VERSION_MAX_ALLOWED (NM_API_VERSION)
|
||||
#endif
|
||||
|
||||
/* sanity checks */
|
||||
#if NM_VERSION_MIN_REQUIRED > NM_VERSION_NEXT_STABLE
|
||||
#error "NM_VERSION_MIN_REQUIRED must be <= NM_VERSION_NEXT_STABLE"
|
||||
#if NM_VERSION_MIN_REQUIRED > NM_API_VERSION
|
||||
#error "NM_VERSION_MIN_REQUIRED must be <= NM_API_VERSION"
|
||||
#endif
|
||||
#if NM_VERSION_MAX_ALLOWED < NM_VERSION_MIN_REQUIRED
|
||||
#error "NM_VERSION_MAX_ALLOWED must be >= NM_VERSION_MIN_REQUIRED"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
project(
|
||||
'NetworkManager', 'c',
|
||||
# XXX: When incrementing version also:
|
||||
# - add corresponding NM_VERSION_x_y_z macros in
|
||||
# "shared/nm-version-macros.h.in"
|
||||
# - update number in configure.ac
|
||||
version: '1.11.1',
|
||||
license: 'GPL2+',
|
||||
default_options: [
|
||||
|
|
|
|||
|
|
@ -115,7 +115,6 @@
|
|||
/* for internal compilation we don't want the deprecation macros
|
||||
* to be in effect. Define the widest range of versions to effectively
|
||||
* disable deprecation checks */
|
||||
#define NM_VERSION_MAX_ALLOWED NM_VERSION_NEXT_STABLE
|
||||
#define NM_VERSION_MIN_REQUIRED NM_VERSION_0_9_8
|
||||
|
||||
#ifndef NM_MORE_ASSERTS
|
||||
|
|
|
|||
|
|
@ -74,8 +74,23 @@
|
|||
#define NM_VERSION_1_10 (NM_ENCODE_VERSION (1, 10, 0))
|
||||
#define NM_VERSION_1_12 (NM_ENCODE_VERSION (1, 12, 0))
|
||||
|
||||
#define NM_VERSION_CUR_STABLE NM_VERSION_1_10
|
||||
#define NM_VERSION_NEXT_STABLE NM_VERSION_1_12
|
||||
/* For releases, NM_API_VERSION is equal to NM_VERSION.
|
||||
*
|
||||
* For development builds, NM_API_VERSION is the next
|
||||
* stable API after NM_VERSION. When you run a development
|
||||
* version, you are already using the future API, even if
|
||||
* it is not yet release. Hence, the currently used API
|
||||
* version is the future one. */
|
||||
#define NM_API_VERSION \
|
||||
(((NM_MINOR_VERSION % 2) == 1) \
|
||||
? NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION + 1, 0 ) \
|
||||
: NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION , ((NM_MICRO_VERSION + 1) / 2) * 2))
|
||||
|
||||
/* deprecated. */
|
||||
#define NM_VERSION_CUR_STABLE NM_API_VERSION
|
||||
|
||||
/* deprecated. */
|
||||
#define NM_VERSION_NEXT_STABLE NM_API_VERSION
|
||||
|
||||
#define NM_VERSION NM_ENCODE_VERSION (NM_MAJOR_VERSION, NM_MINOR_VERSION, NM_MICRO_VERSION)
|
||||
|
||||
|
|
|
|||
|
|
@ -553,7 +553,7 @@ nm_config_create_keyfile ()
|
|||
|
||||
/* this is an external variable, to make loading testable. Other then that,
|
||||
* no code is supposed to change this. */
|
||||
guint _nm_config_match_nm_version = NM_VERSION_CUR_STABLE;
|
||||
guint _nm_config_match_nm_version = NM_VERSION;
|
||||
char *_nm_config_match_env = NULL;
|
||||
|
||||
static gboolean
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue