diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2018-02-12 11:53:55 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2018-02-14 16:45:40 -0800 |
commit | 5317211fa029ee8d0e1c802ef8c01f64c470e3d5 (patch) | |
tree | 11f6c6a667cf7918fd2ae7a5a8c8056262966442 | |
parent | 0cd37f9178d79ed62f1952939e1044cda5701a3a (diff) |
meson: use a custom target instead of a generator for i965 oa
Generators really are never the thing you want. The problem in this case
is that a generator must create a file that contains any file that the
generated target depends on. Since brw_oa.py doesn't generate such a
file the generated sources are not regenerated even if the xml files
they should depend on changes.
While we could change brw_oa.py to write such a file, that's silly, it
depends on itself and the xml file. So we'll just use a custom target
instead, which will have the correct dependency behavior and doesn't
really add that much code.
Fixes: 3218056e0eb3 ("meson: Build i965 and dri stack")
CC: Ian Romanick <idr@freedesktop.org>
Signed-off-by: Dylan Baker <dylan.c.baker@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
-rw-r--r-- | src/mesa/drivers/dri/i965/meson.build | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/i965/meson.build b/src/mesa/drivers/dri/i965/meson.build index 9adda06183d..8ce54449002 100644 --- a/src/mesa/drivers/dri/i965/meson.build +++ b/src/mesa/drivers/dri/i965/meson.build @@ -148,20 +148,19 @@ foreach v : ['40', '45', '50', '60', '70', '75', '80', '90', '100'] ) endforeach -oa_generator = generator( - prog_python2, - arguments : [ - '@CURRENT_SOURCE_DIR@/brw_oa.py', '@INPUT@', '--chipset', '@EXTRA_ARGS@', - '--code', '@OUTPUT0@', '--header', '@OUTPUT1@', - ], - output : ['@BASENAME@.c', '@BASENAME@.h'], -) - i965_oa_sources = [] foreach hw : ['hsw', 'bdw', 'chv', 'sklgt2', 'sklgt3', 'sklgt4', 'bxt', 'kblgt2', 'kblgt3', 'glk', 'cflgt2', 'cflgt3'] - _xml = 'brw_oa_@0@.xml'.format(hw) - i965_oa_sources += oa_generator.process(_xml, extra_args : hw) + _name = 'brw_oa_@0@'.format(hw) + i965_oa_sources += custom_target( + _name, + input : ['brw_oa.py', '@0@.xml'.format(_name)], + output : ['@0@.c'.format(_name), '@0@.h'.format(_name)], + command : [ + prog_python2, '@INPUT0@', '--chipset', hw, '--code', '@OUTPUT0@', + '--header', '@OUTPUT1@', '@INPUT1@', + ], + ) endforeach libi965 = static_library( |