build: extract version macros from "nm-version.h" to new header file "nm-version...
authorThomas Haller <thaller@redhat.com>
Fri, 25 Sep 2015 14:07:50 +0000 (16:07 +0200)
committerThomas Haller <thaller@redhat.com>
Wed, 30 Sep 2015 21:10:29 +0000 (23:10 +0200)
For libnm library, "nm-dbus-interface.h" contains defines like the D-Bus
paths of NetworkManager. It is desirable to have this header usable without
having a dependency on "glib.h", for example for a QT application. For that,
commit c0852964a890cf43cc2dcaeff41ac6edc5028f24 removed that dependancy.

For libnm-glib library, the analog to "nm-dbus-interface.h" is
"NetworkManager.h", and the same applies there. Commit
159e827a72f420048e12d318f8ba1edd3f641fc8 removed that include.
However, that broke build on PackageKit [1] which expected to get the
version macros by including "NetworkManager.h". So at least for libnm-glib,
we need to preserve old behavior so that a user including
"NetworkManager.h" gets the version macros, but not "glib.h".

Extract the version macros to a new header file "nm-version-macros.h".
This header doesn't include "glib.h" and can be included from
"NetworkManager.h". This gives as previous behavior and a glib-free
include.

For libnm we still don't include "nm-version-macros.h" to "nm-dbus-interface.h".
Very few users will actually need the version macros, but not using
libnm.
Users that use libnm, should just include (libnm's) "NetworkManager.h" to
get all headers.
As a special case, a user who doesn't want to use glib/libnm, but still
needs both "nm-dbus-interface.h" and "nm-version-macros.h", can include
them both separately.

[1] https://github.com/hughsie/PackageKit/issues/85

Fixes: 4545a7fe9670ce4d7c259c11c2cc853bfae6729b

52 files changed:
.gitignore
callouts/Makefile.am
callouts/tests/Makefile.am
clients/Makefile.am
clients/cli/Makefile.am
clients/tui/Makefile.am
clients/tui/newt/Makefile.am
configure.ac
contrib/fedora/rpm/NetworkManager.spec
docs/libnm-glib/Makefile.am
examples/C/glib/Makefile.am
include/Makefile.am
include/nm-version-macros.h.in [new file with mode: 0644]
libnm-core/Makefile.am
libnm-core/Makefile.libnm-core
libnm-core/nm-dbus-interface.h
libnm-core/nm-version.h [moved from libnm-util/nm-version.h.in with 64% similarity]
libnm-core/tests/Makefile.am
libnm-glib/Makefile.am
libnm-glib/tests/Makefile.am
libnm-util/Makefile.am
libnm-util/NetworkManager.h
libnm-util/nm-version.h [moved from libnm-core/nm-version.h.in with 64% similarity]
libnm-util/tests/Makefile.am
libnm/Makefile.am
libnm/tests/Makefile.am
src/Makefile.am
src/devices/adsl/Makefile.am
src/devices/bluetooth/Makefile.am
src/devices/team/Makefile.am
src/devices/wifi/Makefile.am
src/devices/wifi/tests/Makefile.am
src/devices/wwan/Makefile.am
src/dhcp-manager/Makefile.am
src/dhcp-manager/tests/Makefile.am
src/dnsmasq-manager/tests/Makefile.am
src/platform/tests/Makefile.am
src/ppp-manager/Makefile.am
src/rdisc/tests/Makefile.am
src/settings/plugins/ibft/Makefile.am
src/settings/plugins/ibft/tests/Makefile.am
src/settings/plugins/ifcfg-rh/Makefile.am
src/settings/plugins/ifcfg-rh/tests/Makefile.am
src/settings/plugins/ifnet/Makefile.am
src/settings/plugins/ifnet/tests/Makefile.am
src/settings/plugins/ifupdown/Makefile.am
src/settings/plugins/ifupdown/tests/Makefile.am
src/settings/plugins/keyfile/Makefile.am
src/settings/plugins/keyfile/tests/Makefile.am
src/supplicant-manager/tests/Makefile.am
src/tests/Makefile.am
src/tests/config/Makefile.am

index 42c1f33..f365e95 100644 (file)
@@ -136,6 +136,8 @@ test-*.trs
 /examples/C/qt/list-connections
 /examples/C/qt/change-ipv4-addresses
 
+/include/nm-version-macros.h
+
 /initscript/Slackware/rc.networkmanager
 /initscript/*/[Nn]etwork[Mm]anager
 
@@ -145,7 +147,6 @@ test-*.trs
 
 /libgsystem/
 
-/libnm-core/nm-version.h
 /libnm-core/tests/test-compare
 /libnm-core/tests/test-crypto
 /libnm-core/tests/test-settings-defaults
@@ -162,7 +163,6 @@ test-*.trs
 /libnm-glib/tests/test-nm-client
 /libnm-glib/tests/test-remote-settings-client
 
-/libnm-util/nm-version.h
 /libnm-util/test-crypto
 /libnm-util/tests/test-crypto
 /libnm-util/tests/test-settings-defaults
index a2d574c..3708aeb 100644 (file)
@@ -2,6 +2,7 @@ SUBDIRS = . tests
 
 AM_CPPFLAGS = \
        -I${top_srcdir}/include \
+       -I${top_builddir}/include \
        -I${top_srcdir}/libnm-core \
        -I${top_builddir}/libnm-core \
        $(GLIB_CFLAGS) \
index 9e85180..30b73b1 100644 (file)
@@ -2,6 +2,7 @@ if ENABLE_TESTS
 
 AM_CPPFLAGS = \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-core \
        -I$(top_builddir)/libnm-core \
        -I$(top_srcdir)/callouts \
index e30eb5d..8316dcc 100644 (file)
@@ -1,11 +1,12 @@
 SUBDIRS = cli tui
 
 AM_CPPFLAGS = \
+       -I${top_srcdir}/include \
+       -I$(top_builddir)/include \
        -I${top_srcdir}/libnm-core \
        -I${top_builddir}/libnm-core \
        -I${top_srcdir}/libnm \
        -I${top_builddir}/libnm \
-       -I${top_srcdir}/include \
        $(GLIB_CFLAGS) \
        -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
        -DNMLOCALEDIR=\"$(datadir)/locale\"
index 75c00a9..eef99cb 100644 (file)
@@ -5,6 +5,7 @@ AM_CPPFLAGS = \
        -I${top_srcdir} \
        -I${top_builddir} \
        -I${top_srcdir}/include \
+       -I$(top_builddir)/include \
        -I${top_srcdir}/libnm-core \
        -I${top_builddir}/libnm-core \
        -I${top_srcdir}/libnm \
index ad9335d..f6d93be 100644 (file)
@@ -5,6 +5,7 @@ SUBDIRS = newt .
 AM_CPPFLAGS= \
        -I$(top_srcdir) \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-core \
        -I$(top_builddir)/libnm-core \
        -I$(top_srcdir)/libnm \
index 4633212..9413e96 100644 (file)
@@ -1,5 +1,6 @@
 AM_CPPFLAGS= \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-core \
        -I$(top_builddir)/libnm-core \
        -DG_LOG_DOMAIN=\""nmtui"\" \
index d4f673f..16ffa4f 100644 (file)
@@ -1007,6 +1007,7 @@ AM_CONDITIONAL(SETTING_DOCS_AVAILABLE, test "$build_setting_docs" = "yes" -o "$h
 AC_CONFIG_FILES([
 Makefile
 include/Makefile
+include/nm-version-macros.h
 src/Makefile
 src/tests/Makefile
 src/tests/config/Makefile
@@ -1039,14 +1040,12 @@ src/devices/team/Makefile
 src/devices/wifi/Makefile
 src/devices/wifi/tests/Makefile
 src/devices/wwan/Makefile
-libnm-core/nm-version.h
 libnm-core/Makefile
 libnm-core/tests/Makefile
 libnm/libnm.pc
 libnm/Makefile
 libnm/tests/Makefile
 libnm-util/libnm-util.pc
-libnm-util/nm-version.h
 libnm-util/Makefile
 libnm-util/tests/Makefile
 libnm-glib/libnm-glib.pc
index 0fe856a..aa488cb 100644 (file)
@@ -562,6 +562,7 @@ fi
 %dir %{_includedir}/%{name}
 %{_includedir}/%{name}/%{name}.h
 %{_includedir}/%{name}/NetworkManagerVPN.h
+%{_includedir}/%{name}/nm-version-macros.h
 %{_includedir}/%{name}/nm-version.h
 %{_libdir}/pkgconfig/%{name}.pc
 %dir %{_datadir}/gtk-doc/html/NetworkManager
index 5c3c492..2d78856 100644 (file)
@@ -53,6 +53,8 @@ extra_files = libnm-glib.png
 # CFLAGS and LDFLAGS for compiling scan program. Only needed
 # if $(DOC_MODULE).types is non-empty.
 GTKDOC_CFLAGS =                                \
+       -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-util      \
        -I$(top_builddir)/libnm-util    \
        -I$(top_srcdir)/libnm-glib      \
index d8e5d28..4b03d87 100644 (file)
@@ -1,5 +1,6 @@
 AM_CPPFLAGS = \
        -I${top_srcdir}/include \
+       -I$(top_builddir)/include \
        -I${top_srcdir}/libnm-core \
        -I${top_builddir}/libnm-core \
        -I${top_srcdir}/libnm \
index 2ebd172..f0a1dba 100644 (file)
@@ -4,6 +4,7 @@ EXTRA_DIST = \
      nm-default.h \
      nm-glib.h \
      nm-test-utils.h \
-     nm-macros-internal.h
+     nm-macros-internal.h \
+     nm-version-macros.h.in
 
 CLEANFILES=nm-version.h
diff --git a/include/nm-version-macros.h.in b/include/nm-version-macros.h.in
new file mode 100644 (file)
index 0000000..a8ad5c8
--- /dev/null
@@ -0,0 +1,75 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/*
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * Copyright 2011, 2015 Red Hat, Inc.
+ */
+
+#ifndef __NM_VERSION_MACROS_H__
+#define __NM_VERSION_MACROS_H__
+
+/* This header must not include glib or libnm. */
+
+/**
+ * NM_MAJOR_VERSION:
+ *
+ * Evaluates to the major version number of NetworkManager which this source
+ * is compiled against.
+ */
+#define NM_MAJOR_VERSION (@NM_MAJOR_VERSION@)
+
+/**
+ * NM_MINOR_VERSION:
+ *
+ * Evaluates to the minor version number of NetworkManager which this source
+ * is compiled against.
+ */
+#define NM_MINOR_VERSION (@NM_MINOR_VERSION@)
+
+/**
+ * NM_MICRO_VERSION:
+ *
+ * Evaluates to the micro version number of NetworkManager which this source
+ * compiled against.
+ */
+#define NM_MICRO_VERSION (@NM_MICRO_VERSION@)
+
+/**
+ * NM_CHECK_VERSION:
+ * @major: major version (e.g. 1 for version 1.2.5)
+ * @minor: minor version (e.g. 2 for version 1.2.5)
+ * @micro: micro version (e.g. 5 for version 1.2.5)
+ *
+ * Returns: %TRUE if the version of the NetworkManager header files
+ * is the same as or newer than the passed-in version.
+ */
+#define NM_CHECK_VERSION(major,minor,micro)                         \
+    (NM_MAJOR_VERSION > (major) ||                                  \
+     (NM_MAJOR_VERSION == (major) && NM_MINOR_VERSION > (minor)) || \
+     (NM_MAJOR_VERSION == (major) && NM_MINOR_VERSION == (minor) && NM_MICRO_VERSION >= (micro)))
+
+
+#define NM_ENCODE_VERSION(major,minor,micro) ((major) << 16 | (minor) << 8 | (micro))
+
+#define NM_VERSION_0_9_8  (NM_ENCODE_VERSION (0, 9, 8))
+#define NM_VERSION_0_9_10 (NM_ENCODE_VERSION (0, 9, 10))
+#define NM_VERSION_1_0    (NM_ENCODE_VERSION (1, 0, 0))
+#define NM_VERSION_1_2    (NM_ENCODE_VERSION (1, 2, 0))
+
+#define NM_VERSION_CUR_STABLE  NM_VERSION_1_0
+#define NM_VERSION_NEXT_STABLE NM_VERSION_1_2
+
+#endif  /* __NM_VERSION_MACROS_H__ */
index 470fd9a..55ed2f6 100644 (file)
@@ -4,6 +4,7 @@ SUBDIRS = . tests
 
 AM_CPPFLAGS = \
        -I${top_srcdir}/include \
+       -I${top_builddir}/include \
        -DG_LOG_DOMAIN=\""libnm"\" \
        -DLOCALEDIR=\"$(datadir)/locale\" \
        -DNMCONFDIR=\"$(nmconfdir)\" \
@@ -26,7 +27,7 @@ libnm_core_la_SOURCES =                       \
        $(libnm_core_private_headers)
 
 GLIB_GENERATED = nm-core-enum-types.h nm-core-enum-types.c
-nm_core_enum_types_sources = $(notdir $(libnminclude_HEADERS))
+nm_core_enum_types_sources = $(filter-out %nm-core-enum-types.h,$(libnminclude_HEADERS))
 GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM
 GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM
 
index a3763f4..b5e205a 100644 (file)
@@ -6,8 +6,8 @@ core = $(top_srcdir)/libnm-core
 core_build = $(top_builddir)/libnm-core
 
 libnm_core_headers =                           \
+       $(top_builddir)/include/nm-version-macros.h \
        $(core_build)/nm-core-enum-types.h      \
-       $(core_build)/nm-version.h              \
        $(core)/nm-connection.h                 \
        $(core)/nm-core-types.h                 \
        $(core)/nm-dbus-interface.h             \
@@ -42,6 +42,7 @@ libnm_core_headers =                          \
        $(core)/nm-setting.h                    \
        $(core)/nm-simple-connection.h          \
        $(core)/nm-utils.h                      \
+       $(core)/nm-version.h \
        $(core)/nm-vpn-dbus-interface.h     \
        $(core)/nm-vpn-editor-plugin.h \
        $(core)/nm-vpn-plugin-info.h
index 511cbeb..0dda998 100644 (file)
@@ -26,6 +26,8 @@
 #ifndef __NM_DBUS_INTERFACE_H__
 #define __NM_DBUS_INTERFACE_H__
 
+/* This header must not include glib or libnm. */
+
 #ifndef NM_VERSION_H
 #define NM_AVAILABLE_IN_1_2
 #endif
similarity index 64%
rename from libnm-util/nm-version.h.in
rename to libnm-core/nm-version.h
index 8ae0df6..859a3a8 100644 (file)
@@ -15,7 +15,7 @@
  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  * Boston, MA 02110-1301 USA.
  *
- * Copyright 2011 Red Hat, Inc.
+ * Copyright 2011, 2015 Red Hat, Inc.
  */
 
 #ifndef NM_VERSION_H
 
 #include <glib.h>
 
-/**
- * NM_MAJOR_VERSION:
- *
- * Evaluates to the major version number of NetworkManager which this source
- * is compiled against.
- */
-#define NM_MAJOR_VERSION (@NM_MAJOR_VERSION@)
-
-/**
- * NM_MINOR_VERSION:
- *
- * Evaluates to the minor version number of NetworkManager which this source
- * is compiled against.
- */
-#define NM_MINOR_VERSION (@NM_MINOR_VERSION@)
-
-/**
- * NM_MICRO_VERSION:
- *
- * Evaluates to the micro version number of NetworkManager which this source
- * compiled against.
- */
-#define NM_MICRO_VERSION (@NM_MICRO_VERSION@)
-
-/**
- * NM_CHECK_VERSION:
- * @major: major version (e.g. 1 for version 1.2.5)
- * @minor: minor version (e.g. 2 for version 1.2.5)
- * @micro: micro version (e.g. 5 for version 1.2.5)
- *
- * Returns: %TRUE if the version of the NetworkManager header files
- * is the same as or newer than the passed-in version.
- */
-#define NM_CHECK_VERSION(major,minor,micro)                         \
-    (NM_MAJOR_VERSION > (major) ||                                  \
-     (NM_MAJOR_VERSION == (major) && NM_MINOR_VERSION > (minor)) || \
-     (NM_MAJOR_VERSION == (major) && NM_MINOR_VERSION == (minor) && NM_MICRO_VERSION >= (micro)))
-
+#include <nm-version-macros.h>
 
 /* Deprecation / Availability macros */
 
-#define NM_ENCODE_VERSION(major,minor,micro) ((major) << 16 | (minor) << 8 | (micro))
-
-#define NM_VERSION_0_9_8  (NM_ENCODE_VERSION (0, 9, 8))
-#define NM_VERSION_0_9_10 (NM_ENCODE_VERSION (0, 9, 10))
-#define NM_VERSION_1_0    (NM_ENCODE_VERSION (1, 0, 0))
-#define NM_VERSION_1_2    (NM_ENCODE_VERSION (1, 2, 0))
-
-#define NM_VERSION_CUR_STABLE  NM_VERSION_1_0
-#define NM_VERSION_NEXT_STABLE NM_VERSION_1_2
-
 #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)
index dd38b3d..bcccfda 100644 (file)
@@ -13,6 +13,7 @@ certsdir = $(srcdir)/certs
 
 AM_CPPFLAGS = \
        -I${top_srcdir}/include \
+       -I${top_builddir}/include \
        -I$(top_srcdir)/libnm-core \
        -I$(top_builddir)/libnm-core \
        -DNETWORKMANAGER_COMPILATION \
index 179f4e6..53d5669 100644 (file)
@@ -4,6 +4,7 @@ SUBDIRS = . tests
 
 AM_CPPFLAGS = \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-util \
        -I$(top_builddir)/libnm-util \
        -DG_LOG_DOMAIN=\""libnm-glib"\" \
index 7168d3d..aeaaa6b 100644 (file)
@@ -2,6 +2,7 @@ if ENABLE_TESTS
 
 AM_CPPFLAGS = \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-util \
        -I$(top_builddir)/libnm-util \
        -I$(top_srcdir)/libnm-glib \
index 14c6cca..29c83f0 100644 (file)
@@ -5,6 +5,7 @@ SUBDIRS = . tests
 AM_CPPFLAGS = \
        -I${top_srcdir} \
        -I${top_srcdir}/include \
+       -I$(top_builddir)/include \
        -DG_LOG_DOMAIN=\""libnm-util"\" \
        -DLOCALEDIR=\"$(datadir)/locale\" \
        -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_LIB \
@@ -24,6 +25,7 @@ endif
 lib_LTLIBRARIES=libnm-util.la
 
 libnm_util_include_HEADERS =           \
+       $(top_builddir)/include/nm-version-macros.h \
        NetworkManager.h                \
        NetworkManagerVPN.h             \
        nm-connection.h                 \
@@ -54,11 +56,11 @@ libnm_util_include_HEADERS =                \
        nm-setting-wireless.h           \
        nm-setting-wireless-security.h  \
        nm-setting-vpn.h                \
-       nm-utils.h
+       nm-utils.h \
+       nm-version.h
 
 nodist_libnm_util_include_HEADERS = \
-       nm-utils-enum-types.h           \
-       nm-version.h
+       nm-utils-enum-types.h
 
 libnm_util_la_private_headers = \
        crypto.h                        \
@@ -159,7 +161,7 @@ pkgconfig_DATA = libnm-util.pc
 
 DISTCLEANFILES = libnm-util.pc
 
-EXTRA_DIST = libnm-util.pc.in libnm-util.ver nm-version.h.in
+EXTRA_DIST = libnm-util.pc.in libnm-util.ver
 
 -include $(INTROSPECTION_MAKEFILE)
 INTROSPECTION_GIRS =
index b6827c2..d83e4ab 100644 (file)
@@ -26,7 +26,9 @@
 #ifndef NETWORK_MANAGER_H
 #define NETWORK_MANAGER_H
 
-#include <nm-version.h>
+/* This header must not include glib or libnm. */
+
+#include <nm-version-macros.h>
 
 /*
  * dbus services details
similarity index 64%
rename from libnm-core/nm-version.h.in
rename to libnm-util/nm-version.h
index 8ae0df6..fd94e21 100644 (file)
 
 #include <glib.h>
 
-/**
- * NM_MAJOR_VERSION:
- *
- * Evaluates to the major version number of NetworkManager which this source
- * is compiled against.
- */
-#define NM_MAJOR_VERSION (@NM_MAJOR_VERSION@)
-
-/**
- * NM_MINOR_VERSION:
- *
- * Evaluates to the minor version number of NetworkManager which this source
- * is compiled against.
- */
-#define NM_MINOR_VERSION (@NM_MINOR_VERSION@)
-
-/**
- * NM_MICRO_VERSION:
- *
- * Evaluates to the micro version number of NetworkManager which this source
- * compiled against.
- */
-#define NM_MICRO_VERSION (@NM_MICRO_VERSION@)
-
-/**
- * NM_CHECK_VERSION:
- * @major: major version (e.g. 1 for version 1.2.5)
- * @minor: minor version (e.g. 2 for version 1.2.5)
- * @micro: micro version (e.g. 5 for version 1.2.5)
- *
- * Returns: %TRUE if the version of the NetworkManager header files
- * is the same as or newer than the passed-in version.
- */
-#define NM_CHECK_VERSION(major,minor,micro)                         \
-    (NM_MAJOR_VERSION > (major) ||                                  \
-     (NM_MAJOR_VERSION == (major) && NM_MINOR_VERSION > (minor)) || \
-     (NM_MAJOR_VERSION == (major) && NM_MINOR_VERSION == (minor) && NM_MICRO_VERSION >= (micro)))
-
+#include <nm-version-macros.h>
 
 /* Deprecation / Availability macros */
 
-#define NM_ENCODE_VERSION(major,minor,micro) ((major) << 16 | (minor) << 8 | (micro))
-
-#define NM_VERSION_0_9_8  (NM_ENCODE_VERSION (0, 9, 8))
-#define NM_VERSION_0_9_10 (NM_ENCODE_VERSION (0, 9, 10))
-#define NM_VERSION_1_0    (NM_ENCODE_VERSION (1, 0, 0))
-#define NM_VERSION_1_2    (NM_ENCODE_VERSION (1, 2, 0))
-
-#define NM_VERSION_CUR_STABLE  NM_VERSION_1_0
-#define NM_VERSION_NEXT_STABLE NM_VERSION_1_2
-
 #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)
index 16a7f8f..e580a13 100644 (file)
@@ -2,6 +2,7 @@ if ENABLE_TESTS
 
 AM_CPPFLAGS = \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-util \
        -I$(top_builddir)/libnm-util \
        -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
index 2ae3f87..a08bd80 100644 (file)
@@ -4,6 +4,7 @@ SUBDIRS = . tests
 
 AM_CPPFLAGS = \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_builddir)/introspection \
        -I$(top_srcdir)/libnm-core \
        -I$(top_builddir)/libnm-core \
@@ -25,6 +26,7 @@ lib_LTLIBRARIES = libnm.la
 libnmincludedir = $(includedir)/libnm
 
 libnminclude_hfiles =                  \
+       $(top_builddir)/include/nm-version-macros.h \
        NetworkManager.h                \
        nm-access-point.h               \
        nm-active-connection.h          \
index a2dafec..0acbae8 100644 (file)
@@ -2,6 +2,7 @@ if ENABLE_TESTS
 
 AM_CPPFLAGS = \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm \
        -I$(top_builddir)/libnm \
        -I$(top_srcdir)/libnm-core \
index 9d1cb31..39082de 100644 (file)
@@ -33,6 +33,7 @@ endif
 
 AM_CPPFLAGS =                          \
        -I$(top_srcdir)/include         \
+       -I$(top_builddir)/include \
        -I$(top_builddir)/introspection \
        -I$(top_srcdir)/libnm-core      \
        -I$(top_builddir)/libnm-core    \
@@ -130,6 +131,7 @@ libsystemd_nm_la_SOURCES = \
 
 libsystemd_nm_la_CPPFLAGS = \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-core \
        -I$(top_builddir)/libnm-core \
        $(SYSTEMD_NM_CFLAGS_PATHS) \
index 1bccf7d..fa32c25 100644 (file)
@@ -9,6 +9,7 @@ AM_CPPFLAGS = \
        -I${top_srcdir}/src/platform \
        -I${top_builddir}/introspection \
        -I${top_srcdir}/include \
+       -I$(top_builddir)/include \
        -I${top_builddir}/libnm-core \
        -I${top_srcdir}/libnm-core \
        -DG_LOG_DOMAIN=\""NetworkManager-adsl"\" \
index 7606329..37217df 100644 (file)
@@ -11,6 +11,7 @@ AM_CPPFLAGS = \
        -I${top_srcdir}/src/devices/wwan \
        -I${top_builddir}/introspection \
        -I${top_srcdir}/include \
+       -I$(top_builddir)/include \
        -I${top_builddir}/libnm-core \
        -I${top_srcdir}/libnm-core \
        -DG_LOG_DOMAIN=\""NetworkManager-bluetooth"\" \
index b48ea56..13559a1 100644 (file)
@@ -9,6 +9,7 @@ AM_CPPFLAGS = \
        -I${top_srcdir}/src/platform \
        -I${top_builddir}/introspection \
        -I${top_srcdir}/include \
+       -I$(top_builddir)/include \
        -I${top_builddir}/libnm-core \
        -I${top_srcdir}/libnm-core \
        -DG_LOG_DOMAIN=\""NetworkManager-team"\" \
index 9133e31..250727f 100644 (file)
@@ -15,6 +15,7 @@ AM_CPPFLAGS = \
        -I${top_srcdir}/src/supplicant-manager \
        -I${top_builddir}/introspection \
        -I${top_srcdir}/include \
+       -I$(top_builddir)/include \
        -I${top_builddir}/libnm-core \
        -I${top_srcdir}/libnm-core \
        -DG_LOG_DOMAIN=\""NetworkManager-wifi"\" \
index bc342ea..2e25dc4 100644 (file)
@@ -1,6 +1,7 @@
 AM_CPPFLAGS = \
        -I$(top_builddir)/introspection \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-core \
        -I$(top_builddir)/libnm-core \
        -I${top_srcdir}/src/platform \
index 56d4fb6..1d2dcb6 100644 (file)
@@ -10,8 +10,9 @@ AM_CPPFLAGS = \
        -I${top_srcdir}/src/platform \
        -I${top_builddir}/introspection \
        -I${top_srcdir}/include \
-       -I${top_builddir}/libnm-core \
+       -I$(top_builddir)/include \
        -I${top_srcdir}/libnm-core \
+       -I${top_builddir}/libnm-core \
        -DG_LOG_DOMAIN=\""NetworkManager-wwan"\" \
        -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
        -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \
index 6437ddd..b07bbc6 100644 (file)
@@ -5,6 +5,7 @@ nm_dhcp_helper_SOURCES = nm-dhcp-helper.c
 nm_dhcp_helper_CPPFLAGS = \
        $(GLIB_CFLAGS) \
        -I$(top_srcdir)/include \
+       -I${top_builddir}/include \
        -I$(top_srcdir)/libnm-core \
        -I$(top_builddir)/libnm-core \
        -DG_LOG_DOMAIN=\""nm-dhcp-helper"\" \
index 16a11db..578f714 100644 (file)
@@ -1,5 +1,6 @@
 AM_CPPFLAGS = \
        -I$(top_srcdir)/include \
+       -I${top_builddir}/include \
        -I${top_srcdir}/libnm-core \
        -I${top_builddir}/libnm-core \
        -I$(top_srcdir)/src/dhcp-manager \
index fec3385..0ddaa38 100644 (file)
@@ -1,5 +1,6 @@
 AM_CPPFLAGS = \
        -I$(top_srcdir)/include \
+       -I${top_builddir}/include \
        -I${top_srcdir}/libnm-core \
        -I${top_builddir}/libnm-core \
        -I$(top_srcdir)/src/dnsmasq-manager \
index 983fb79..1fb621d 100644 (file)
@@ -1,6 +1,7 @@
 AM_CPPFLAGS = \
        -I${top_srcdir} \
        -I${top_srcdir}/include \
+       -I${top_builddir}/include \
        -I${top_srcdir}/src \
        -I${top_builddir}/src \
        -I${top_srcdir}/libnm-core \
index ee5788f..650c430 100644 (file)
@@ -2,6 +2,7 @@ if WITH_PPP
 
 AM_CPPFLAGS = \
        -I${top_srcdir}/include \
+       -I${top_builddir}/include \
        -I${top_srcdir}/libnm-core \
        -I${top_srcdir}/src \
        -I${top_builddir}/libnm-core \
index b5b09f1..cf302ad 100644 (file)
@@ -1,6 +1,7 @@
 AM_CPPFLAGS = \
        -I${top_srcdir} \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I${top_srcdir}/src \
        -I${top_srcdir}/src/platform \
        -I${top_srcdir}/libnm-core \
index 3f9e934..49d7831 100644 (file)
@@ -15,6 +15,7 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/src/platform \
        -I$(top_srcdir)/src/settings \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-core \
        -I$(top_builddir)/libnm-core \
        -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
index 257a3a5..3c3b5cf 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
        $(GLIB_CFLAGS) \
        $(CODE_COVERAGE_CFLAGS) \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-core \
        -I$(top_builddir)/libnm-core \
        -I$(top_srcdir)/src/ \
index 34f04f9..ebae637 100644 (file)
@@ -44,6 +44,7 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/src/platform \
        -I$(top_srcdir)/src/settings \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-core \
        -I$(top_builddir)/libnm-core \
        -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \
index 4ac4eba..4f942d2 100644 (file)
@@ -8,6 +8,7 @@ AM_CPPFLAGS = \
        $(GLIB_CFLAGS) \
        $(CODE_COVERAGE_CFLAGS) \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-core \
        -I$(top_builddir)/libnm-core \
        -I$(top_srcdir)/src/ \
index 0be0cc6..5e1713a 100644 (file)
@@ -7,6 +7,7 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/src/platform \
        -I$(top_srcdir)/src/settings \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-core \
        -I$(top_builddir)/libnm-core \
        -DG_LOG_DOMAIN=\""NetworkManager-ifnet"\" \
index 8d97f56..9c1bcbf 100644 (file)
@@ -5,6 +5,7 @@ if ENABLE_TESTS
 AM_CPPFLAGS= \
        -I$(srcdir)/../ \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-core \
        -I$(top_builddir)/libnm-core \
        -I$(top_srcdir)/src \
index dfa64e0..b3ab2ef 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/src \
        -I$(top_srcdir)/src/settings \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-core \
        -I$(top_builddir)/libnm-core \
        -DG_LOG_DOMAIN=\""NetworkManager-ifupdown"\" \
index 4d404d9..55d9f88 100644 (file)
@@ -2,6 +2,7 @@ if ENABLE_TESTS
 
 AM_CPPFLAGS = \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-core \
        -I$(top_builddir)/libnm-core \
        -I$(top_srcdir)/src \
index f146e7b..e3566a3 100644 (file)
@@ -6,6 +6,7 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/src \
        -I$(top_srcdir)/src/settings \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-core \
        -I$(top_builddir)/libnm-core \
        -DG_LOG_DOMAIN=\""NetworkManager-keyfile"\" \
index 80f934e..34331e1 100644 (file)
@@ -6,6 +6,7 @@ SUBDIRS=keyfiles
 
 AM_CPPFLAGS = \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-core \
        -I$(top_builddir)/libnm-core \
        -I$(top_srcdir)/src \
index e786664..66bd7d5 100644 (file)
@@ -2,6 +2,7 @@ SUBDIRS=certs
 
 AM_CPPFLAGS = \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-core \
        -I$(top_builddir)/libnm-core \
        -I$(top_srcdir)/src \
index 8e06a54..c4dd716 100644 (file)
@@ -2,6 +2,7 @@ SUBDIRS = config
 
 AM_CPPFLAGS = \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-core \
        -I$(top_builddir)/libnm-core \
        -I$(top_srcdir)/src/platform \
index e0e3e13..cc1ffb3 100644 (file)
@@ -1,5 +1,6 @@
 AM_CPPFLAGS = \
        -I$(top_srcdir)/include \
+       -I$(top_builddir)/include \
        -I$(top_srcdir)/libnm-core \
        -I$(top_builddir)/libnm-core \
        -I$(top_srcdir)/src/ \