summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-05-30 10:21:04 +0200
committerThomas Haller <thaller@redhat.com>2018-05-31 15:59:38 +0200
commit7fcf33908be0ec10c7ed8a2a36bf8bf516058f5e (patch)
tree07ca01d7fd98127ccfedb937ce38c5f9fe6f292d
parentd63cf1ef2faba57595112a82e962b9643cce4718 (diff)
downloadNetworkManager-7fcf33908be0ec10c7ed8a2a36bf8bf516058f5e.tar.gz
build: define NM_BUILD_SRCDIR and NM_BUILD_BUILDDIR
-rw-r--r--Makefile.am5
-rw-r--r--meson.build5
2 files changed, 10 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 85e225c0d5..9a410ba2bd 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -106,6 +106,11 @@ endif
###############################################################################
+nm_build_cflags = \
+ -DNM_BUILD_SRCDIR=\"$(abs_srcdir)\" \
+ -DNM_BUILD_BUILDDIR=\"$(abs_builddir)\" \
+ $(NULL)
+
set_sanitizer_env = \
[ -n "$(SANITIZER_ENV)" ] && export $(SANITIZER_ENV) ; \
if echo $(SANITIZER_LIB_CFLAGS) $(SANITIZER_EXEC_CFLAGS) | grep -e -fsanitize=address > /dev/null; then \
diff --git a/meson.build b/meson.build
index ff87b31e7d..8afe57d140 100644
--- a/meson.build
+++ b/meson.build
@@ -54,6 +54,11 @@ nm_pkgstatedir = join_paths(nm_localstatedir, nm_name)
nm_vpndir = join_paths(nm_libdir, nm_name)
nm_plugindir = join_paths(nm_libdir, nm_name, dist_version)
+nm_build_cflags = [
+ '-DNM_BUILD_SRCDIR="@0@"'.format(meson.source_root()),
+ '-DNM_BUILD_BUILDDIR="@0@"'.format(meson.build_root()),
+]
+
libnm_name = 'libnm'
current = 1