From b051e16eba17cb7eb36c141db6992830894542db Mon Sep 17 00:00:00 2001 From: Arkadiusz Hiler Date: Mon, 9 Jul 2018 17:27:12 +0300 Subject: meson: Prefix generated rpathdirs to designate their use Since meson does not have variable scoping it gets confusing if you set different values to the same variable in different places. Let's prefix each generated rpathdir to be more explicit about their intended use and to avoid accidental overwrites. Cc: Daniel Vetter Cc: Petri Latvala Signed-off-by: Arkadiusz Hiler Reviewed-by: Petri Latvala --- tests/meson.build | 18 +++++++++--------- tools/meson.build | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tests/meson.build b/tests/meson.build index 32c2156c..c1f9fa07 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -250,16 +250,16 @@ if get_option('use_rpath') # prefix. meson enforces this. # Start from the executable - rpathdir = '$ORIGIN' + libexecdir_rpathdir = '$ORIGIN' # Executables are installed in libexecdir. Add a .. for each # directory name in it. foreach p : libexecdir.split('/') - rpathdir = join_paths(rpathdir, '..') + libexecdir_rpathdir = join_paths(libexecdir_rpathdir, '..') endforeach # Add relative path to libdir - rpathdir = join_paths(rpathdir, libdir) + libexecdir_rpathdir = join_paths(libexecdir_rpathdir, libdir) else - rpathdir = '' + libexecdir_rpathdir = '' endif test_executables = [] @@ -268,28 +268,28 @@ foreach prog : test_progs test_executables += executable(prog, prog + '.c', dependencies : test_deps, install_dir : libexecdir, - install_rpath : rpathdir, + install_rpath : libexecdir_rpathdir, install : true) endforeach test_executables += executable('gem_eio', 'gem_eio.c', dependencies : test_deps + [ realtime ], install_dir : libexecdir, - install_rpath : rpathdir, + install_rpath : libexecdir_rpathdir, install : true) test_progs += 'gem_eio' test_executables += executable('perf_pmu', 'perf_pmu.c', dependencies : test_deps + [ lib_igt_perf ], install_dir : libexecdir, - install_rpath : rpathdir, + install_rpath : libexecdir_rpathdir, install : true) test_progs += 'perf_pmu' executable('testdisplay', ['testdisplay.c', 'testdisplay_hotplug.c'], dependencies : test_deps, install_dir : libexecdir, - install_rpath : rpathdir, + install_rpath : libexecdir_rpathdir, install : true) test_progs += 'testdisplay' @@ -311,7 +311,7 @@ endforeach executable('gem_stress', 'gem_stress.c', install : true, install_dir : libexecdir, - install_rpath : rpathdir, + install_rpath : libexecdir_rpathdir, dependencies : igt_deps) # IMPORTANT: These tests here are all disabled because the result in sometime diff --git a/tools/meson.build b/tools/meson.build index 8ed1ccf4..ae9ba493 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -59,22 +59,22 @@ if get_option('use_rpath') # enforces this. # Start from the executable - rpathdir = '$ORIGIN' + tools_rpathdir = '$ORIGIN' # Executables are installed in bindir. Add a .. for each # directory name in it. foreach p : bindir.split('/') - rpathdir = join_paths(rpathdir, '..') + tools_rpathdir = join_paths(tools_rpathdir, '..') endforeach # Add relative path to libdir - rpathdir = join_paths(rpathdir, libdir) + tools_rpathdir = join_paths(tools_rpathdir, libdir) else - rpathdir = '' + tools_rpathdir = '' endif foreach prog : tools_progs executable(prog, prog + '.c', dependencies : tool_deps, - install_rpath : rpathdir, + install_rpath : tools_rpathdir, install : true) endforeach @@ -85,21 +85,21 @@ if libudev.found() ] executable('intel_dp_compliance', sources : intel_dp_compliance_src, dependencies : [tool_deps, libudev], - install_rpath : rpathdir, + install_rpath : tools_rpathdir, install : true) endif intel_l3_parity_src = [ 'intel_l3_parity.c', 'intel_l3_udev_listener.c' ] executable('intel_l3_parity', sources : intel_l3_parity_src, dependencies : tool_deps, - install_rpath : rpathdir, + install_rpath : tools_rpathdir, install : true) intel_reg_src = [ 'intel_reg.c', 'intel_reg_decode.c', 'intel_reg_spec.c' ] executable('intel_reg', sources : intel_reg_src, dependencies : tool_deps, install : true, - install_rpath : rpathdir, + install_rpath : tools_rpathdir, c_args : [ '-DIGT_DATADIR="@0@"'.format(join_paths(prefix, datadir)), ]) @@ -118,7 +118,7 @@ shared_library('intel_aubdump', 'aubdump.c', executable('intel_gpu_top', 'intel_gpu_top.c', install : true, - install_rpath : rpathdir, + install_rpath : tools_rpathdir, dependencies : tool_deps + [ lib_igt_perf ]) conf_data = configuration_data() -- cgit v1.2.3