summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/meson.build25
-rw-r--r--meson.build4
2 files changed, 14 insertions, 15 deletions
diff --git a/lib/meson.build b/lib/meson.build
index 9929520e..d5a1c970 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -231,47 +231,46 @@ i915_perf_hardware = [
i915_xml_files = []
foreach hw : i915_perf_hardware
- i915_xml_files += 'i915/perf-configs/oa-@0@.xml'.format(hw)
+ i915_xml_files += files('i915/perf-configs/oa-@0@.xml'.format(hw))
endforeach
i915_perf_files += custom_target(
'i915-perf-equations',
- input : i915_xml_files,
+ input : [ 'i915/perf-configs/perf-equations-codegen.py' ] + i915_xml_files,
output : [ 'i915_perf_equations.c', 'i915_perf_equations.h' ],
command : [
- find_program('i915/perf-configs/perf-equations-codegen.py'),
+ python3, '@INPUT0@',
'--code', '@OUTPUT0@',
'--header', '@OUTPUT1@',
- '@INPUT@',
+ i915_xml_files,
])
-i915_perf_register_codegen = find_program('i915/perf-configs/perf-registers-codegen.py')
-i915_perf_metrics_codegen = find_program('i915/perf-configs/perf-metricset-codegen.py')
-
foreach hw : i915_perf_hardware
i915_perf_files += custom_target(
'i915-perf-registers-@0@'.format(hw),
- input : 'i915/perf-configs/oa-@0@.xml'.format(hw),
+ input : [ 'i915/perf-configs/perf-registers-codegen.py',
+ 'i915/perf-configs/oa-@0@.xml'.format(hw) ],
output : [ 'i915_perf_registers_@0@.c'.format(hw),
'i915_perf_registers_@0@.h'.format(hw), ],
command : [
- i915_perf_register_codegen,
+ python3, '@INPUT0@',
'--code', '@OUTPUT0@',
'--header', '@OUTPUT1@',
- '--xml-file', '@INPUT@'
+ '--xml-file', '@INPUT1@'
])
i915_perf_files += custom_target(
'i915-perf-metrics-@0@'.format(hw),
- input : 'i915/perf-configs/oa-@0@.xml'.format(hw),
+ input : [ 'i915/perf-configs/perf-metricset-codegen.py',
+ 'i915/perf-configs/oa-@0@.xml'.format(hw) ],
output : [ 'i915_perf_metrics_@0@.c'.format(hw),
'i915_perf_metrics_@0@.h'.format(hw), ],
command : [
- i915_perf_metrics_codegen,
+ python3, '@INPUT0@',
'--code', '@OUTPUT0@',
'--header', '@OUTPUT1@',
'--equations-include', 'i915_perf_equations.h',
'--registers-include', 'i915_perf_registers_@0@.h'.format(hw),
- '--xml-file', '@INPUT@',
+ '--xml-file', '@INPUT1@',
])
endforeach
diff --git a/meson.build b/meson.build
index 5d9655f7..06e76189 100644
--- a/meson.build
+++ b/meson.build
@@ -262,6 +262,7 @@ libexecdir = join_paths(get_option('libexecdir'), 'igt-gpu-tools')
amdgpudir = join_paths(libexecdir, 'amdgpu')
mandir = get_option('mandir')
pkgconfigdir = join_paths(libdir, 'pkgconfig')
+python3 = find_program('python3', required : true)
if get_option('use_rpath')
# Set up runpath for the test executables towards libigt.so.
@@ -316,8 +317,7 @@ subdir('overlay')
subdir('man')
gtk_doc = dependency('gtk-doc', required : build_docs)
-python3 = find_program('python3', required : build_docs)
-if build_tests and gtk_doc.found() and python3.found()
+if build_tests and gtk_doc.found()
subdir('docs')
elif build_docs.enabled()
error('Documentation requires building tests')