diff options
author | Lionel Landwerlin <lionel.g.landwerlin@intel.com> | 2021-04-22 21:40:54 +0300 |
---|---|---|
committer | Lionel Landwerlin <lionel.g.landwerlin@intel.com> | 2021-05-21 13:47:53 +0300 |
commit | b4a876b3a1a871f43070c8756e440004c97f829a (patch) | |
tree | d177ae2eea933f3a6263cffdad81cb598bc0a5f7 /lib/meson.build | |
parent | d53068fe9146bd89aed837b344c79e4367bdb4c1 (diff) |
lib/i915/perf: have python scripts a custom_target input
That way when changing the scripts, the generated files are
regenerated.
This change makes python3 an explicit hard dependency, but that was
already the case for lib/i915/perf.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Diffstat (limited to 'lib/meson.build')
-rw-r--r-- | lib/meson.build | 25 |
1 files changed, 12 insertions, 13 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 |