diff --git a/clients/common/meson.build b/clients/common/meson.build index 303b99e7f..324abb441 100644 --- a/clients/common/meson.build +++ b/clients/common/meson.build @@ -39,8 +39,8 @@ if enable_introspection test( 'check-settings-docs', - find_program(join_paths(meson.source_root(), 'tools', 'check-settings-docs.sh')), - args: [meson.source_root(), meson.build_root(), 'clients/common/' + settings_docs] + find_program(join_paths(source_root, 'tools', 'check-settings-docs.sh')), + args: [source_root, build_root, 'clients/common/' + settings_docs], ) else settings_docs_source = configure_file( diff --git a/docs/meson.build b/docs/meson.build index f89592ab3..e9768e527 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -6,6 +6,6 @@ subdir('api') test( 'check-docs', - find_program(join_paths(meson.source_root(), 'tools', 'check-docs.sh')), - args: [meson.source_root(), meson.build_root()], + find_program(join_paths(source_root, 'tools', 'check-docs.sh')), + args: [source_root, build_root], ) diff --git a/introspection/meson.build b/introspection/meson.build index 631432a7a..03cfa4624 100644 --- a/introspection/meson.build +++ b/introspection/meson.build @@ -76,7 +76,7 @@ foreach iface: ifaces if gio_unix_dep.version().version_compare('>= 2.51.3') dbus_iface_xml_path = join_paths(meson.current_build_dir(), 'dbus-' + iface_xml) else - dbus_iface_xml_path = join_paths(meson.build_root(), 'dbus-' + iface_xml) + dbus_iface_xml_path = join_paths(build_root, 'dbus-' + iface_xml) endif content_files += dbus_iface_xml_path diff --git a/libnm-core/meson.build b/libnm-core/meson.build index 9637afaad..16cec096f 100644 --- a/libnm-core/meson.build +++ b/libnm-core/meson.build @@ -293,7 +293,7 @@ shared_nm_libnm_core_aux_dep = declare_dependency( ############################################################################### -enums_to_docbook = join_paths(meson.source_root(), 'tools', 'enums-to-docbook.pl') +enums_to_docbook = join_paths(source_root, 'tools', 'enums-to-docbook.pl') docbooks = [ ['nm-dbus-types', 'nm-dbus-interface.h', 'NetworkManager D-Bus API Types'], diff --git a/meson.build b/meson.build index 69408ad34..9dc059ee6 100644 --- a/meson.build +++ b/meson.build @@ -69,6 +69,9 @@ gnome = import('gnome') i18n = import('i18n') pkg = import('pkgconfig') +source_root = meson.current_source_dir() +build_root = meson.current_build_dir() + po_dir = join_paths(meson.source_root(), 'po') intltool_merge = find_program('intltool-merge') @@ -81,7 +84,7 @@ top_inc = include_directories('.') perl = find_program('perl') xsltproc = find_program('xsltproc') -check_exports = find_program(join_paths(meson.source_root(), 'tools', 'check-exports.sh')) +check_exports = find_program(join_paths(source_root, 'tools', 'check-exports.sh')) cc = meson.get_compiler('c') @@ -190,9 +193,9 @@ endif add_project_arguments(common_flags, language: 'c') add_project_link_arguments(common_ldflags, language: 'c') -linker_script_binary = join_paths(meson.source_root(), 'linker-script-binary.ver') -linker_script_devices = join_paths(meson.source_root(), 'linker-script-devices.ver') -linker_script_settings = join_paths(meson.source_root(), 'linker-script-settings.ver') +linker_script_binary = join_paths(source_root, 'linker-script-binary.ver') +linker_script_devices = join_paths(source_root, 'linker-script-devices.ver') +linker_script_settings = join_paths(source_root, 'linker-script-settings.ver') ldflags_linker_script_binary = [ '-Wl,--version-script,@0@'.format(linker_script_binary) ] ldflags_linker_script_devices = [ '-Wl,--version-script,@0@'.format(linker_script_devices) ] @@ -736,7 +739,7 @@ endif tests = get_option('tests') enable_tests = (tests != 'no') require_root_tests = (tests == 'root') -test_script = find_program(join_paths(meson.source_root(), 'tools', 'run-nm-test.sh')) +test_script = find_program(join_paths(source_root, 'tools', 'run-nm-test.sh')) # valgrind locations = get_option('valgrind') @@ -749,13 +752,13 @@ endif if enable_valgrind valgrind_suppressions_path = get_option('valgrind_suppressions') if valgrind_suppressions_path == '' - valgrind_suppressions_path = join_paths(meson.source_root(), 'valgrind.suppressions') + valgrind_suppressions_path = join_paths(source_root, 'valgrind.suppressions') endif endif test_args = [ '--called-from-make', - meson.build_root(), + build_root, '', enable_valgrind ? valgrind.path() : '', enable_valgrind ? valgrind_suppressions_path : '', @@ -866,8 +869,8 @@ config_extra_h.set_quoted('NMPLUGINDIR', nm_plugindir) config_extra_h.set_quoted('NMRUNDIR', nm_pkgrundir) config_extra_h.set_quoted('NMSTATEDIR', nm_pkgstatedir) config_extra_h.set_quoted('NMVPNDIR', nm_vpndir) -config_extra_h.set_quoted('NM_BUILD_BUILDDIR', meson.build_root()) -config_extra_h.set_quoted('NM_BUILD_SRCDIR', meson.source_root()) +config_extra_h.set_quoted('NM_BUILD_BUILDDIR', build_root) +config_extra_h.set_quoted('NM_BUILD_SRCDIR', source_root) if enable_ppp config_extra_h.set_quoted('PPPD_PLUGIN_DIR', pppd_plugin_dir) endif diff --git a/src/meson.build b/src/meson.build index a9e7601de..84bad0040 100644 --- a/src/meson.build +++ b/src/meson.build @@ -272,7 +272,7 @@ subdir('settings/plugins') # NetworkManager binary -create_exports_networkmanager = join_paths(meson.source_root(), 'tools', 'create-exports-NetworkManager.sh') +create_exports_networkmanager = join_paths(source_root, 'tools', 'create-exports-NetworkManager.sh') symbol_map_name = 'NetworkManager.ver' # libNetworkManager.a, as built by meson doesn't contain all symbols @@ -295,7 +295,7 @@ ver_script = custom_target( symbol_map_name, output: symbol_map_name, depends: [ network_manager_sym, core_plugins ], - command: [create_exports_networkmanager, '--called-from-build', meson.source_root()], + command: [create_exports_networkmanager, '--called-from-build', source_root], ) ldflags = ['-rdynamic', '-Wl,--version-script,@0@'.format(ver_script.full_path())] @@ -323,6 +323,6 @@ endif test( 'check-config-options', - find_program(join_paths(meson.source_root(), 'tools', 'check-config-options.sh')), - args: [meson.source_root()] + find_program(join_paths(source_root, 'tools', 'check-config-options.sh')), + args: source_root, )