From 60856a7b4982aaaa4f22a002878d5d78cd63e272 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 11 Dec 2017 16:16:56 -0800 Subject: meson: don't use intermediate variables that are immediately discarded For things like: loop x = func() list += x end just do: loop list += func() end Acked-by: Eric Engestrom Signed-off-by: Dylan Baker --- src/intel/genxml/meson.build | 3 +-- src/intel/isl/meson.build | 6 ++---- src/intel/vulkan/meson.build | 6 ++---- 3 files changed, 5 insertions(+), 10 deletions(-) (limited to 'src/intel') diff --git a/src/intel/genxml/meson.build b/src/intel/genxml/meson.build index 30c0d8bf2f6..371f85307c8 100644 --- a/src/intel/genxml/meson.build +++ b/src/intel/genxml/meson.build @@ -48,12 +48,11 @@ genX_bits_h = custom_target( gen_xml_pack = [] foreach f : gen_xml_files _name = '@0@_pack.h'.format(f.split('.')[0]) - _xml = custom_target( + gen_xml_pack += custom_target( _name, input : ['gen_pack_header.py', f], output : _name, command : [prog_python2, '@INPUT@'], capture : true, ) - gen_xml_pack += _xml endforeach diff --git a/src/intel/isl/meson.build b/src/intel/isl/meson.build index 116750d86d6..0838c32af32 100644 --- a/src/intel/isl/meson.build +++ b/src/intel/isl/meson.build @@ -53,15 +53,13 @@ foreach g : [['40', isl_gen4_files], ['50', []], ['60', isl_gen6_files], ['70', isl_gen7_files], ['75', []], ['80', isl_gen8_files], ['90', isl_gen9_files], ['100', []]] _gen = g[0] - _sources = g[1] - _lib = static_library( + isl_gen_libs += static_library( 'libisl_gen@0@'.format(_gen), - [_sources, isl_gen_files, gen_xml_pack], + [g[1], isl_gen_files, gen_xml_pack], include_directories : [inc_common, inc_intel], c_args : [c_vis_args, no_override_init_args, '-DGEN_VERSIONx10=@0@'.format(_gen)], ) - isl_gen_libs += _lib endforeach isl_format_layout_c = custom_target( diff --git a/src/intel/vulkan/meson.build b/src/intel/vulkan/meson.build index 66266a0e95a..4cd7a025813 100644 --- a/src/intel/vulkan/meson.build +++ b/src/intel/vulkan/meson.build @@ -89,10 +89,9 @@ foreach g : [['70', ['gen7_cmd_buffer.c']], ['75', ['gen7_cmd_buffer.c']], ['80', ['gen8_cmd_buffer.c']], ['90', ['gen8_cmd_buffer.c']], ['100', ['gen8_cmd_buffer.c']]] _gen = g[0] - _files = g[1] - _lib = static_library( + libanv_gen_libs += static_library( 'libanv_gen@0@'.format(_gen), - [anv_gen_files, _files, block_entrypoints], + [anv_gen_files, g[1], block_entrypoints], include_directories : [ inc_common, inc_compiler, inc_drm_uapi, inc_intel, inc_vulkan_util, inc_vulkan_wsi, @@ -103,7 +102,6 @@ foreach g : [['70', ['gen7_cmd_buffer.c']], ['75', ['gen7_cmd_buffer.c']], ], dependencies : [dep_libdrm, dep_valgrind], ) - libanv_gen_libs += _lib endforeach libanv_files = files( -- cgit v1.2.3