v3d: Pass the version being generated to the pack generator script.
[mesa.git] / src / broadcom / cle / meson.build
index b1ff8322524eddbe2f934bed8334bbe8d1d12a28..a45538c986f071227af299959e641c67fa7cc083 100644 (file)
@@ -26,30 +26,28 @@ v3d_versions = [
 ]
 
 v3d_xml_files = []
-foreach v: v3d_versions
-  v3d_xml_files += 'v3d_packet_v@0@.xml'.format(v)
-endforeach
-
-v3d_xml_h = custom_target(
-  'v3d_xml.h',
-  input : ['../../intel/genxml/gen_zipped_file.py', v3d_xml_files],
-  output : 'v3d_xml.h',
-  command : [prog_python2, '@INPUT@'],
-  capture : true,
-)
-
 v3d_xml_pack = []
-foreach f : v3d_xml_files
+foreach v : v3d_versions
+  f = 'v3d_packet_v@0@.xml'.format(v)
   _name = '@0@_pack.h'.format(f.split('.')[0])
+  v3d_xml_files += f
   v3d_xml_pack += custom_target(
     _name,
     input : ['gen_pack_header.py', f],
     output : _name,
-    command : [prog_python2, '@INPUT@'],
+    command : [prog_python2, '@INPUT@', '@0@'.format(v)],
     capture : true,
   )
 endforeach
 
+v3d_xml_h = custom_target(
+  'v3d_xml.h',
+  input : ['../../intel/genxml/gen_zipped_file.py', v3d_xml_files],
+  output : 'v3d_xml.h',
+  command : [prog_python2, '@INPUT@'],
+  capture : true,
+)
+
 libbroadcom_cle = static_library(
   ['broadcom_cle', v3d_xml_h],
   'v3d_decoder.c',