Skip to contentSkip to conversation

meson: Refactor get_option() calls for directories

PATCH Superseded Petri Latvala 3 participants 6 messages Jan 15, 2018 – Jan 17, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meson: Refactor get_option() calls for directories

Fetch the configuration values in the toplevel meson.build for all subdirs to share.

---
 assembler/meson.build  |  8 +++-----
 benchmarks/meson.build |  6 ++++--
 lib/meson.build        |  3 +--
 man/meson.build        |  2 +-
 meson.build            |  9 +++++++++
 tests/meson.build      |  6 +-----
 tools/meson.build      | 14 +++++---------
 7 files changed, 24 insertions(+), 24 deletions(-)
assembler/meson.build +3 -5
index b5ac678d..7517d82f 100644
@@ -35,13 +35,11 @@ executable('intel-gen4asm', 'main.c', lfiles, pfiles,
 executable('intel-gen4disasm', 'disasm-main.c',
 	   link_with : lib_brw, install : true)
 
-pkgconfigdir = join_paths(get_option('libdir'), 'pgkconfig')
-
 conf_data = configuration_data()
-conf_data.set('prefix', get_option('prefix'))
+conf_data.set('prefix', prefix)
 conf_data.set('exec_prefix', '${prefix}')
-conf_data.set('libdir', join_paths('${prefix}', get_option('libdir')))
-conf_data.set('includedir', join_paths('${prefix}', get_option('includedir')))
+conf_data.set('libdir', join_paths('${prefix}', libdir))
+conf_data.set('includedir', join_paths('${prefix}', includedir))
 conf_data.set('VERSION', meson.project_version())
 configure_file(input : 'intel-gen4asm.pc.in', output : 'intel-gen4asm.pc',
 	       configuration : conf_data, install_dir : pkgconfigdir)
benchmarks/meson.build +4 -2
index 26d65c4b..27836c1d 100644
@@ -27,16 +27,18 @@ if libdrm_intel.found()
 	]
 endif
 
+benchmarksdir = join_paths(libexecdir, 'benchmarks')
+
 foreach prog : benchmark_progs
 	# FIXME meson doesn't like binaries with the same name
 	# meanwhile just suffix with _bench
 	executable(prog + '_bench', prog + '.c',
 		   install : true,
-		   install_dir : join_paths(get_option('libexecdir'), 'intel-gpu-tools', 'benchmarks'),
+		   install_dir : benchmarksdir,
 		   dependencies : test_deps)
 endforeach
 
 executable('gem_wsim_bench', 'gem_wsim.c',
 	   install : true,
-	   install_dir : join_paths(get_option('libexecdir'), 'intel-gpu-tools', 'benchmarks'),
+	   install_dir : benchmarksdir,
 	   dependencies : test_deps + [ lib_igt_perf ])
lib/meson.build +1 -2
index 311e2342..b3bbc311 100644
@@ -145,7 +145,6 @@ if chamelium.found()
 	lib_sources += 'igt_chamelium.c'
 endif
 
-pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'intel-gpu-tools')
 srcdir = join_paths(meson.source_root(), 'tests')
 
 lib_version = vcs_tag(input : 'version.h.in', output : 'version.h',
@@ -160,7 +159,7 @@ foreach f: lib_sources
 	include_directories: inc,
 	dependencies : lib_deps,
 	c_args : [
-	    '-DIGT_DATADIR="@0@"'.format(pkgdatadir),
+	    '-DIGT_DATADIR="@0@"'.format(datadir),
 	    '-DIGT_SRCDIR="@0@"'.format(srcdir),
 	    '-DIGT_LOG_DOMAIN="@0@"'.format(f.split('.')[0]),
 	])
man/meson.build +1 -1
index 351d025b..49b0686a 100644
@@ -34,6 +34,6 @@ if rst2man.found()
 				input: manpage + '.rst',
 				output : manpage + '.1.gz',
 				install : true,
-				install_dir : join_paths(get_option('mandir'), 'man1'))
+				install_dir : join_paths(mandir, 'man1'))
 	endforeach
 endif
meson.build +9 -0
index 0950d3c7..d403ba5b 100644
@@ -127,6 +127,15 @@ config.set_quoted('TARGET_CPU_PLATFORM', host_machine.cpu_family())
 
 configure_file(output: 'config.h', install: false, configuration: config)
 
+prefix = get_option('prefix')
+bindir = get_option('bindir')
+datadir = join_paths(get_option('datadir'), 'intel-gpu-tools')
+includedir = get_option('includedir')
+libdir = get_option('libdir')
+libexecdir = join_paths(get_option('libexecdir'), 'intel-gpu-tools')
+mandir = get_option('mandir')
+pkgconfigdir = join_paths(libdir, 'pkgconfig')
+
 subdir('lib')
 subdir('tests')
 subdir('benchmarks')
tests/meson.build +1 -5
index 4c4bee1d..2322217d 100644
@@ -255,8 +255,6 @@ if alsa.found() and gsl.found()
 	test_deps += alsa
 endif
 
-libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'), 'intel-gpu-tools')
-
 test_executables = []
 
 foreach prog : test_progs
@@ -278,8 +276,6 @@ executable('testdisplay', ['testdisplay.c', 'testdisplay_hotplug.c'],
 	   install : true)
 test_progs += 'testdisplay'
 
-pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'intel-gpu-tools')
-
 gen_testlist = find_program('generate_testlist.sh')
 test_list = custom_target('testlist',
 	      output : 'test-list.txt',
@@ -318,6 +314,6 @@ image_files = [
   '1080p-right.png',
   'pass.png',
 ]
-install_data(sources : image_files, install_dir : pkgdatadir)
+install_data(sources : image_files, install_dir : datadir)
 
 subdir('intel-ci')
tools/meson.build +5 -9
index 7fc5390a..df65e0f8 100644
@@ -55,8 +55,6 @@ foreach prog : tools_progs
 		   install : true)
 endforeach
 
-pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'intel-gpu-tools')
-
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
@@ -77,14 +75,12 @@ executable('intel_reg', sources : intel_reg_src,
 	   dependencies : tool_deps,
 	   install : true,
 	   c_args : [
-	     '-DIGT_DATADIR="@0@"'.format(pkgdatadir),
+	     '-DIGT_DATADIR="@0@"'.format(datadir),
 	   ])
 
-bindir = join_paths(get_option('prefix'), get_option('bindir'))
-
 install_data('intel_gpu_abrt', install_dir : bindir)
 
-install_subdir('registers', install_dir : pkgdatadir,
+install_subdir('registers', install_dir : datadir,
 	       exclude_files : [
 		 'Makefile', 'Makefile.in', 'Makefile.am',
 	       ])
@@ -95,10 +91,10 @@ shared_library('intel_aubdump', 'aubdump.c',
 	       install : true)
 
 conf_data = configuration_data()
-conf_data.set('prefix', get_option('prefix'))
+conf_data.set('prefix', prefix)
 conf_data.set('exec_prefix', '${prefix}')
-conf_data.set('libdir', join_paths('${prefix}', get_option('libdir')))
+conf_data.set('libdir', join_paths('${prefix}', libdir))
 configure_file(input : 'intel_aubdump.in', output : 'intel_aubdump',
-               configuration : conf_data, install_dir : get_option('bindir'))
+               configuration : conf_data, install_dir : bindir)
 
 subdir('null_state_gen')
Signature · 6 lines
2.14.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH v2 1/1 meson: Refactor get_option() calls for directories

Fetch the configuration values in the toplevel meson.build for all subdirs to share.

v2: Also remember tests/intel-ci/meson.build

---
 assembler/meson.build      |  8 +++-----
 benchmarks/meson.build     |  6 ++++--
 lib/meson.build            |  3 +--
 man/meson.build            |  2 +-
 meson.build                |  9 +++++++++
 tests/intel-ci/meson.build |  2 +-
 tests/meson.build          |  6 +-----
 tools/meson.build          | 14 +++++---------
 8 files changed, 25 insertions(+), 25 deletions(-)
assembler/meson.build +3 -5
index b5ac678d..7517d82f 100644
@@ -35,13 +35,11 @@ executable('intel-gen4asm', 'main.c', lfiles, pfiles,
 executable('intel-gen4disasm', 'disasm-main.c',
 	   link_with : lib_brw, install : true)
 
-pkgconfigdir = join_paths(get_option('libdir'), 'pgkconfig')
-
 conf_data = configuration_data()
-conf_data.set('prefix', get_option('prefix'))
+conf_data.set('prefix', prefix)
 conf_data.set('exec_prefix', '${prefix}')
-conf_data.set('libdir', join_paths('${prefix}', get_option('libdir')))
-conf_data.set('includedir', join_paths('${prefix}', get_option('includedir')))
+conf_data.set('libdir', join_paths('${prefix}', libdir))
+conf_data.set('includedir', join_paths('${prefix}', includedir))
 conf_data.set('VERSION', meson.project_version())
 configure_file(input : 'intel-gen4asm.pc.in', output : 'intel-gen4asm.pc',
 	       configuration : conf_data, install_dir : pkgconfigdir)
benchmarks/meson.build +4 -2
index 26d65c4b..27836c1d 100644
@@ -27,16 +27,18 @@ if libdrm_intel.found()
 	]
 endif
 
+benchmarksdir = join_paths(libexecdir, 'benchmarks')
+
 foreach prog : benchmark_progs
 	# FIXME meson doesn't like binaries with the same name
 	# meanwhile just suffix with _bench
 	executable(prog + '_bench', prog + '.c',
 		   install : true,
-		   install_dir : join_paths(get_option('libexecdir'), 'intel-gpu-tools', 'benchmarks'),
+		   install_dir : benchmarksdir,
 		   dependencies : test_deps)
 endforeach
 
 executable('gem_wsim_bench', 'gem_wsim.c',
 	   install : true,
-	   install_dir : join_paths(get_option('libexecdir'), 'intel-gpu-tools', 'benchmarks'),
+	   install_dir : benchmarksdir,
 	   dependencies : test_deps + [ lib_igt_perf ])
lib/meson.build +1 -2
index 311e2342..b3bbc311 100644
@@ -145,7 +145,6 @@ if chamelium.found()
 	lib_sources += 'igt_chamelium.c'
 endif
 
-pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'intel-gpu-tools')
 srcdir = join_paths(meson.source_root(), 'tests')
 
 lib_version = vcs_tag(input : 'version.h.in', output : 'version.h',
@@ -160,7 +159,7 @@ foreach f: lib_sources
 	include_directories: inc,
 	dependencies : lib_deps,
 	c_args : [
-	    '-DIGT_DATADIR="@0@"'.format(pkgdatadir),
+	    '-DIGT_DATADIR="@0@"'.format(datadir),
 	    '-DIGT_SRCDIR="@0@"'.format(srcdir),
 	    '-DIGT_LOG_DOMAIN="@0@"'.format(f.split('.')[0]),
 	])
man/meson.build +1 -1
index 351d025b..49b0686a 100644
@@ -34,6 +34,6 @@ if rst2man.found()
 				input: manpage + '.rst',
 				output : manpage + '.1.gz',
 				install : true,
-				install_dir : join_paths(get_option('mandir'), 'man1'))
+				install_dir : join_paths(mandir, 'man1'))
 	endforeach
 endif
meson.build +9 -0
index 0950d3c7..d403ba5b 100644
@@ -127,6 +127,15 @@ config.set_quoted('TARGET_CPU_PLATFORM', host_machine.cpu_family())
 
 configure_file(output: 'config.h', install: false, configuration: config)
 
+prefix = get_option('prefix')
+bindir = get_option('bindir')
+datadir = join_paths(get_option('datadir'), 'intel-gpu-tools')
+includedir = get_option('includedir')
+libdir = get_option('libdir')
+libexecdir = join_paths(get_option('libexecdir'), 'intel-gpu-tools')
+mandir = get_option('mandir')
+pkgconfigdir = join_paths(libdir, 'pkgconfig')
+
 subdir('lib')
 subdir('tests')
 subdir('benchmarks')
tests/intel-ci/meson.build +1 -1
index 5394a2ff..b3abb848 100644
@@ -5,4 +5,4 @@ intelci_files = [
   'README',
 ]
 
-install_data(sources : intelci_files, install_dir : pkgdatadir)
+install_data(sources : intelci_files, install_dir : datadir)
tests/meson.build +1 -5
index 4c4bee1d..2322217d 100644
@@ -255,8 +255,6 @@ if alsa.found() and gsl.found()
 	test_deps += alsa
 endif
 
-libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'), 'intel-gpu-tools')
-
 test_executables = []
 
 foreach prog : test_progs
@@ -278,8 +276,6 @@ executable('testdisplay', ['testdisplay.c', 'testdisplay_hotplug.c'],
 	   install : true)
 test_progs += 'testdisplay'
 
-pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'intel-gpu-tools')
-
 gen_testlist = find_program('generate_testlist.sh')
 test_list = custom_target('testlist',
 	      output : 'test-list.txt',
@@ -318,6 +314,6 @@ image_files = [
   '1080p-right.png',
   'pass.png',
 ]
-install_data(sources : image_files, install_dir : pkgdatadir)
+install_data(sources : image_files, install_dir : datadir)
 
 subdir('intel-ci')
tools/meson.build +5 -9
index 7fc5390a..df65e0f8 100644
@@ -55,8 +55,6 @@ foreach prog : tools_progs
 		   install : true)
 endforeach
 
-pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'intel-gpu-tools')
-
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
@@ -77,14 +75,12 @@ executable('intel_reg', sources : intel_reg_src,
 	   dependencies : tool_deps,
 	   install : true,
 	   c_args : [
-	     '-DIGT_DATADIR="@0@"'.format(pkgdatadir),
+	     '-DIGT_DATADIR="@0@"'.format(datadir),
 	   ])
 
-bindir = join_paths(get_option('prefix'), get_option('bindir'))
-
 install_data('intel_gpu_abrt', install_dir : bindir)
 
-install_subdir('registers', install_dir : pkgdatadir,
+install_subdir('registers', install_dir : datadir,
 	       exclude_files : [
 		 'Makefile', 'Makefile.in', 'Makefile.am',
 	       ])
@@ -95,10 +91,10 @@ shared_library('intel_aubdump', 'aubdump.c',
 	       install : true)
 
 conf_data = configuration_data()
-conf_data.set('prefix', get_option('prefix'))
+conf_data.set('prefix', prefix)
 conf_data.set('exec_prefix', '${prefix}')
-conf_data.set('libdir', join_paths('${prefix}', get_option('libdir')))
+conf_data.set('libdir', join_paths('${prefix}', libdir))
 configure_file(input : 'intel_aubdump.in', output : 'intel_aubdump',
-               configuration : conf_data, install_dir : get_option('bindir'))
+               configuration : conf_data, install_dir : bindir)
 
 subdir('null_state_gen')
Signature · 6 lines
2.14.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 7 lines · Petri Latvala

Fetch the configuration values in the toplevel meson.build for all subdirs to share.

v2: Also remember tests/intel-ci/meson.build

I haven't tried, but why exactly can we drop all the calls to get_option? -Daniel

Quoted 197 lines
---
 assembler/meson.build      |  8 +++-----
 benchmarks/meson.build     |  6 ++++--
 lib/meson.build            |  3 +--
 man/meson.build            |  2 +-
 meson.build                |  9 +++++++++
 tests/intel-ci/meson.build |  2 +-
 tests/meson.build          |  6 +-----
 tools/meson.build          | 14 +++++---------
 8 files changed, 25 insertions(+), 25 deletions(-)
assembler/meson.build +3 -5
index b5ac678d..7517d82f 100644
@@ -35,13 +35,11 @@ executable('intel-gen4asm', 'main.c', lfiles, pfiles,
 executable('intel-gen4disasm', 'disasm-main.c',
 	   link_with : lib_brw, install : true)
 
-pkgconfigdir = join_paths(get_option('libdir'), 'pgkconfig')
-
 conf_data = configuration_data()
-conf_data.set('prefix', get_option('prefix'))
+conf_data.set('prefix', prefix)
 conf_data.set('exec_prefix', '${prefix}')
-conf_data.set('libdir', join_paths('${prefix}', get_option('libdir')))
-conf_data.set('includedir', join_paths('${prefix}', get_option('includedir')))
+conf_data.set('libdir', join_paths('${prefix}', libdir))
+conf_data.set('includedir', join_paths('${prefix}', includedir))
 conf_data.set('VERSION', meson.project_version())
 configure_file(input : 'intel-gen4asm.pc.in', output : 'intel-gen4asm.pc',
 	       configuration : conf_data, install_dir : pkgconfigdir)
benchmarks/meson.build +4 -2
index 26d65c4b..27836c1d 100644
@@ -27,16 +27,18 @@ if libdrm_intel.found()
 	]
 endif
 
+benchmarksdir = join_paths(libexecdir, 'benchmarks')
+
 foreach prog : benchmark_progs
 	# FIXME meson doesn't like binaries with the same name
 	# meanwhile just suffix with _bench
 	executable(prog + '_bench', prog + '.c',
 		   install : true,
-		   install_dir : join_paths(get_option('libexecdir'), 'intel-gpu-tools', 'benchmarks'),
+		   install_dir : benchmarksdir,
 		   dependencies : test_deps)
 endforeach
 
 executable('gem_wsim_bench', 'gem_wsim.c',
 	   install : true,
-	   install_dir : join_paths(get_option('libexecdir'), 'intel-gpu-tools', 'benchmarks'),
+	   install_dir : benchmarksdir,
 	   dependencies : test_deps + [ lib_igt_perf ])
lib/meson.build +1 -2
index 311e2342..b3bbc311 100644
@@ -145,7 +145,6 @@ if chamelium.found()
 	lib_sources += 'igt_chamelium.c'
 endif
 
-pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'intel-gpu-tools')
 srcdir = join_paths(meson.source_root(), 'tests')
 
 lib_version = vcs_tag(input : 'version.h.in', output : 'version.h',
@@ -160,7 +159,7 @@ foreach f: lib_sources
 	include_directories: inc,
 	dependencies : lib_deps,
 	c_args : [
-	    '-DIGT_DATADIR="@0@"'.format(pkgdatadir),
+	    '-DIGT_DATADIR="@0@"'.format(datadir),
 	    '-DIGT_SRCDIR="@0@"'.format(srcdir),
 	    '-DIGT_LOG_DOMAIN="@0@"'.format(f.split('.')[0]),
 	])
man/meson.build +1 -1
index 351d025b..49b0686a 100644
@@ -34,6 +34,6 @@ if rst2man.found()
 				input: manpage + '.rst',
 				output : manpage + '.1.gz',
 				install : true,
-				install_dir : join_paths(get_option('mandir'), 'man1'))
+				install_dir : join_paths(mandir, 'man1'))
 	endforeach
 endif
meson.build +9 -0
index 0950d3c7..d403ba5b 100644
@@ -127,6 +127,15 @@ config.set_quoted('TARGET_CPU_PLATFORM', host_machine.cpu_family())
 
 configure_file(output: 'config.h', install: false, configuration: config)
 
+prefix = get_option('prefix')
+bindir = get_option('bindir')
+datadir = join_paths(get_option('datadir'), 'intel-gpu-tools')
+includedir = get_option('includedir')
+libdir = get_option('libdir')
+libexecdir = join_paths(get_option('libexecdir'), 'intel-gpu-tools')
+mandir = get_option('mandir')
+pkgconfigdir = join_paths(libdir, 'pkgconfig')
+
 subdir('lib')
 subdir('tests')
 subdir('benchmarks')
tests/intel-ci/meson.build +1 -1
index 5394a2ff..b3abb848 100644
@@ -5,4 +5,4 @@ intelci_files = [
   'README',
 ]
 
-install_data(sources : intelci_files, install_dir : pkgdatadir)
+install_data(sources : intelci_files, install_dir : datadir)
tests/meson.build +1 -5
index 4c4bee1d..2322217d 100644
@@ -255,8 +255,6 @@ if alsa.found() and gsl.found()
 	test_deps += alsa
 endif
 
-libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'), 'intel-gpu-tools')
-
 test_executables = []
 
 foreach prog : test_progs
@@ -278,8 +276,6 @@ executable('testdisplay', ['testdisplay.c', 'testdisplay_hotplug.c'],
 	   install : true)
 test_progs += 'testdisplay'
 
-pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'intel-gpu-tools')
-
 gen_testlist = find_program('generate_testlist.sh')
 test_list = custom_target('testlist',
 	      output : 'test-list.txt',
@@ -318,6 +314,6 @@ image_files = [
   '1080p-right.png',
   'pass.png',
 ]
-install_data(sources : image_files, install_dir : pkgdatadir)
+install_data(sources : image_files, install_dir : datadir)
 
 subdir('intel-ci')
tools/meson.build +5 -9
index 7fc5390a..df65e0f8 100644
@@ -55,8 +55,6 @@ foreach prog : tools_progs
 		   install : true)
 endforeach
 
-pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'intel-gpu-tools')
-
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
@@ -77,14 +75,12 @@ executable('intel_reg', sources : intel_reg_src,
 	   dependencies : tool_deps,
 	   install : true,
 	   c_args : [
-	     '-DIGT_DATADIR="@0@"'.format(pkgdatadir),
+	     '-DIGT_DATADIR="@0@"'.format(datadir),
 	   ])
 
-bindir = join_paths(get_option('prefix'), get_option('bindir'))
-
 install_data('intel_gpu_abrt', install_dir : bindir)
 
-install_subdir('registers', install_dir : pkgdatadir,
+install_subdir('registers', install_dir : datadir,
 	       exclude_files : [
 		 'Makefile', 'Makefile.in', 'Makefile.am',
 	       ])
@@ -95,10 +91,10 @@ shared_library('intel_aubdump', 'aubdump.c',
 	       install : true)
 
 conf_data = configuration_data()
-conf_data.set('prefix', get_option('prefix'))
+conf_data.set('prefix', prefix)
 conf_data.set('exec_prefix', '${prefix}')
-conf_data.set('libdir', join_paths('${prefix}', get_option('libdir')))
+conf_data.set('libdir', join_paths('${prefix}', libdir))
 configure_file(input : 'intel_aubdump.in', output : 'intel_aubdump',
-               configuration : conf_data, install_dir : get_option('bindir'))
+               configuration : conf_data, install_dir : bindir)
 
 subdir('null_state_gen')
Signature · 1 line
2.14.1
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by
#3 lore raw
Quoted 10 lines · Daniel Vetter
Quoted 7 lines · Petri Latvala

Fetch the configuration values in the toplevel meson.build for all subdirs to share.

v2: Also remember tests/intel-ci/meson.build

I haven't tried, but why exactly can we drop all the calls to get_option?

I was blind.

Quoted 204 lines

-Daniel

Quoted 197 lines
---
 assembler/meson.build      |  8 +++-----
 benchmarks/meson.build     |  6 ++++--
 lib/meson.build            |  3 +--
 man/meson.build            |  2 +-
 meson.build                |  9 +++++++++
 tests/intel-ci/meson.build |  2 +-
 tests/meson.build          |  6 +-----
 tools/meson.build          | 14 +++++---------
 8 files changed, 25 insertions(+), 25 deletions(-)
assembler/meson.build +3 -5
index b5ac678d..7517d82f 100644
@@ -35,13 +35,11 @@ executable('intel-gen4asm', 'main.c', lfiles, pfiles,
 executable('intel-gen4disasm', 'disasm-main.c',
 	   link_with : lib_brw, install : true)
 
-pkgconfigdir = join_paths(get_option('libdir'), 'pgkconfig')
-
 conf_data = configuration_data()
-conf_data.set('prefix', get_option('prefix'))
+conf_data.set('prefix', prefix)
 conf_data.set('exec_prefix', '${prefix}')
-conf_data.set('libdir', join_paths('${prefix}', get_option('libdir')))
-conf_data.set('includedir', join_paths('${prefix}', get_option('includedir')))
+conf_data.set('libdir', join_paths('${prefix}', libdir))
+conf_data.set('includedir', join_paths('${prefix}', includedir))
 conf_data.set('VERSION', meson.project_version())
 configure_file(input : 'intel-gen4asm.pc.in', output : 'intel-gen4asm.pc',
 	       configuration : conf_data, install_dir : pkgconfigdir)
benchmarks/meson.build +4 -2
index 26d65c4b..27836c1d 100644
@@ -27,16 +27,18 @@ if libdrm_intel.found()
 	]
 endif
 
+benchmarksdir = join_paths(libexecdir, 'benchmarks')
+
 foreach prog : benchmark_progs
 	# FIXME meson doesn't like binaries with the same name
 	# meanwhile just suffix with _bench
 	executable(prog + '_bench', prog + '.c',
 		   install : true,
-		   install_dir : join_paths(get_option('libexecdir'), 'intel-gpu-tools', 'benchmarks'),
+		   install_dir : benchmarksdir,
 		   dependencies : test_deps)
 endforeach
 
 executable('gem_wsim_bench', 'gem_wsim.c',
 	   install : true,
-	   install_dir : join_paths(get_option('libexecdir'), 'intel-gpu-tools', 'benchmarks'),
+	   install_dir : benchmarksdir,
 	   dependencies : test_deps + [ lib_igt_perf ])
lib/meson.build +1 -2
index 311e2342..b3bbc311 100644
@@ -145,7 +145,6 @@ if chamelium.found()
 	lib_sources += 'igt_chamelium.c'
 endif
 
-pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'intel-gpu-tools')
 srcdir = join_paths(meson.source_root(), 'tests')
 
 lib_version = vcs_tag(input : 'version.h.in', output : 'version.h',
@@ -160,7 +159,7 @@ foreach f: lib_sources
 	include_directories: inc,
 	dependencies : lib_deps,
 	c_args : [
-	    '-DIGT_DATADIR="@0@"'.format(pkgdatadir),
+	    '-DIGT_DATADIR="@0@"'.format(datadir),
 	    '-DIGT_SRCDIR="@0@"'.format(srcdir),
 	    '-DIGT_LOG_DOMAIN="@0@"'.format(f.split('.')[0]),
 	])
man/meson.build +1 -1
index 351d025b..49b0686a 100644
@@ -34,6 +34,6 @@ if rst2man.found()
 				input: manpage + '.rst',
 				output : manpage + '.1.gz',
 				install : true,
-				install_dir : join_paths(get_option('mandir'), 'man1'))
+				install_dir : join_paths(mandir, 'man1'))
 	endforeach
 endif
meson.build +9 -0
index 0950d3c7..d403ba5b 100644
@@ -127,6 +127,15 @@ config.set_quoted('TARGET_CPU_PLATFORM', host_machine.cpu_family())
 
 configure_file(output: 'config.h', install: false, configuration: config)
 
+prefix = get_option('prefix')
+bindir = get_option('bindir')
+datadir = join_paths(get_option('datadir'), 'intel-gpu-tools')
+includedir = get_option('includedir')
+libdir = get_option('libdir')
+libexecdir = join_paths(get_option('libexecdir'), 'intel-gpu-tools')
+mandir = get_option('mandir')
+pkgconfigdir = join_paths(libdir, 'pkgconfig')
+
 subdir('lib')
 subdir('tests')
 subdir('benchmarks')
tests/intel-ci/meson.build +1 -1
index 5394a2ff..b3abb848 100644
@@ -5,4 +5,4 @@ intelci_files = [
   'README',
 ]
 
-install_data(sources : intelci_files, install_dir : pkgdatadir)
+install_data(sources : intelci_files, install_dir : datadir)
tests/meson.build +1 -5
index 4c4bee1d..2322217d 100644
@@ -255,8 +255,6 @@ if alsa.found() and gsl.found()
 	test_deps += alsa
 endif
 
-libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'), 'intel-gpu-tools')
-
 test_executables = []
 
 foreach prog : test_progs
@@ -278,8 +276,6 @@ executable('testdisplay', ['testdisplay.c', 'testdisplay_hotplug.c'],
 	   install : true)
 test_progs += 'testdisplay'
 
-pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'intel-gpu-tools')
-
 gen_testlist = find_program('generate_testlist.sh')
 test_list = custom_target('testlist',
 	      output : 'test-list.txt',
@@ -318,6 +314,6 @@ image_files = [
   '1080p-right.png',
   'pass.png',
 ]
-install_data(sources : image_files, install_dir : pkgdatadir)
+install_data(sources : image_files, install_dir : datadir)
 
 subdir('intel-ci')
tools/meson.build +5 -9
index 7fc5390a..df65e0f8 100644
@@ -55,8 +55,6 @@ foreach prog : tools_progs
 		   install : true)
 endforeach
 
-pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'intel-gpu-tools')
-
 if libudev.found()
 	intel_dp_compliance_src = [
 		'intel_dp_compliance.c',
@@ -77,14 +75,12 @@ executable('intel_reg', sources : intel_reg_src,
 	   dependencies : tool_deps,
 	   install : true,
 	   c_args : [
-	     '-DIGT_DATADIR="@0@"'.format(pkgdatadir),
+	     '-DIGT_DATADIR="@0@"'.format(datadir),
 	   ])
 
-bindir = join_paths(get_option('prefix'), get_option('bindir'))
-
 install_data('intel_gpu_abrt', install_dir : bindir)
 
-install_subdir('registers', install_dir : pkgdatadir,
+install_subdir('registers', install_dir : datadir,
 	       exclude_files : [
 		 'Makefile', 'Makefile.in', 'Makefile.am',
 	       ])
@@ -95,10 +91,10 @@ shared_library('intel_aubdump', 'aubdump.c',
 	       install : true)
 
 conf_data = configuration_data()
-conf_data.set('prefix', get_option('prefix'))
+conf_data.set('prefix', prefix)
 conf_data.set('exec_prefix', '${prefix}')
-conf_data.set('libdir', join_paths('${prefix}', get_option('libdir')))
+conf_data.set('libdir', join_paths('${prefix}', libdir))
 configure_file(input : 'intel_aubdump.in', output : 'intel_aubdump',
-               configuration : conf_data, install_dir : get_option('bindir'))
+               configuration : conf_data, install_dir : bindir)
 
 subdir('null_state_gen')
Signature · 1 line
2.14.1
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

✓ Fi.CI.BAT: success for series starting with [v2,1/1] meson: Refactor get_option() calls for directories (rev2)

In reply to Petri Latvala
== Series Details ==

== Series Details ==

Series: series starting with [v2,1/1] meson: Refactor get_option() calls for directories (rev2)
URL : https://patchwork.freedesktop.org/series/36476/
State : success

== Summary ==

IGT patchset tested on top of latest successful build d28d2b253a77beb50a22c2352a141f2d28954027 tests/perf_pmu: Exercise busy stats and lite-restore

with latest DRM-Tip kernel build CI_DRM_3632
cc2f290ac3bc drm-tip: 2018y-01m-15d-12h-58m-19s UTC integration manifest

No testlist changes.

Test debugfs_test:

        Subgroup read_all_entries:
                fail       -> DMESG-FAIL (fi-elk-e7500) fdo#103989
Test gem_mmap_gtt:
        Subgroup basic-small-bo-tiledx:
                pass       -> FAIL       (fi-gdg-551) fdo#102575
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-a:
                dmesg-warn -> PASS       (fi-kbl-r) fdo#104172 +1

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:423s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:426s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:377s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:490s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:283s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:484s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:487s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:472s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:471s
fi-elk-e7500     total:224  pass:168  dwarn:9   dfail:1   fail:0   skip:45 
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:278s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:513s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:394s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:402s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:455s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:414s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:500s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:457s
fi-kbl-r         total:288  pass:260  dwarn:1   dfail:0   fail:0   skip:27  time:505s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:582s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:429s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:513s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:537s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:488s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:489s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:520s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:399s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:572s
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:473s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_775/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

✗ Fi.CI.IGT: warning for series starting with [v2,1/1] meson: Refactor get_option() calls for directories (rev2)

In reply to Petri Latvala
== Series Details ==

== Series Details ==

Series: series starting with [v2,1/1] meson: Refactor get_option() calls for directories (rev2)
URL : https://patchwork.freedesktop.org/series/36476/
State : warning

== Summary ==

Test kms_frontbuffer_tracking:

        Subgroup fbc-1p-primscrn-pri-indfb-draw-render:
                fail       -> PASS       (shard-snb) fdo#101623 +1
Test kms_flip:
        Subgroup vblank-vs-suspend:
                skip       -> PASS       (shard-snb) fdo#102365
        Subgroup plain-flip-ts-check-interruptible:
                fail       -> PASS       (shard-snb) fdo#100368
Test kms_plane:
        Subgroup plane-panning-bottom-right-suspend-pipe-a-planes:
                pass       -> SKIP       (shard-hsw) fdo#103540
Test kms_rmfb:
        Subgroup close-fd:
                pass       -> SKIP       (shard-snb)
Test kms_draw_crc:
        Subgroup draw-method-xrgb2101010-blt-xtiled:
                pass       -> SKIP       (shard-snb)
Test pm_rc6_residency:
        Subgroup rc6-accuracy:
                skip       -> PASS       (shard-snb)

fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103540 https://bugs.freedesktop.org/show_bug.cgi?id=103540

shard-hsw        total:2723 pass:1545 dwarn:1   dfail:0   fail:10  skip:1167 time:9164s
shard-snb        total:2723 pass:1315 dwarn:1   dfail:0   fail:11  skip:1396 time:8030s

Blacklisted hosts:
shard-apl total:2723 pass:1696 dwarn:1 dfail:0 fail:22 skip:1004 time:13592s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_775/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx