python: Stop using the Python 2 exception syntax
[mesa.git] / src / mapi / glapi / gen / meson.build
1 # Copyright © 2017 Intel Corporation
2
3 # Permission is hereby granted, free of charge, to any person obtaining a copy
4 # of this software and associated documentation files (the "Software"), to deal
5 # in the Software without restriction, including without limitation the rights
6 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 # copies of the Software, and to permit persons to whom the Software is
8 # furnished to do so, subject to the following conditions:
9
10 # The above copyright notice and this permission notice shall be included in
11 # all copies or substantial portions of the Software.
12
13 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 # SOFTWARE.
20
21 gl_and_es_api_files = files('gl_and_es_API.xml')
22
23 api_xml_files = files(
24 'gl_API.xml',
25 'es_EXT.xml',
26 'gl_and_es_API.xml',
27 'gl_and_glX_API.xml',
28 'ARB_base_instance.xml',
29 'ARB_blend_func_extended.xml',
30 'ARB_bindless_texture.xml',
31 'ARB_clear_buffer_object.xml',
32 'ARB_clear_texture.xml',
33 'ARB_clip_control.xml',
34 'ARB_color_buffer_float.xml',
35 'ARB_compressed_texture_pixel_storage.xml',
36 'ARB_compute_shader.xml',
37 'ARB_compute_variable_group_size.xml',
38 'ARB_copy_buffer.xml',
39 'ARB_copy_image.xml',
40 'ARB_debug_output.xml',
41 'ARB_depth_buffer_float.xml',
42 'ARB_depth_clamp.xml',
43 'ARB_direct_state_access.xml',
44 'ARB_draw_buffers.xml',
45 'ARB_draw_buffers_blend.xml',
46 'ARB_draw_elements_base_vertex.xml',
47 'ARB_draw_indirect.xml',
48 'ARB_draw_instanced.xml',
49 'ARB_ES2_compatibility.xml',
50 'ARB_ES3_compatibility.xml',
51 'ARB_framebuffer_no_attachments.xml',
52 'ARB_framebuffer_object.xml',
53 'ARB_get_program_binary.xml',
54 'ARB_get_texture_sub_image.xml',
55 'ARB_gl_spirv.xml',
56 'ARB_gpu_shader_fp64.xml',
57 'ARB_gpu_shader_int64.xml',
58 'ARB_gpu_shader5.xml',
59 'ARB_indirect_parameters.xml',
60 'ARB_instanced_arrays.xml',
61 'ARB_internalformat_query.xml',
62 'ARB_internalformat_query2.xml',
63 'ARB_invalidate_subdata.xml',
64 'ARB_map_buffer_range.xml',
65 'ARB_multi_bind.xml',
66 'ARB_pipeline_statistics_query.xml',
67 'ARB_program_interface_query.xml',
68 'ARB_robustness.xml',
69 'ARB_sample_shading.xml',
70 'ARB_sampler_objects.xml',
71 'ARB_seamless_cube_map.xml',
72 'ARB_separate_shader_objects.xml',
73 'ARB_shader_atomic_counters.xml',
74 'ARB_shader_image_load_store.xml',
75 'ARB_shader_subroutine.xml',
76 'ARB_shader_storage_buffer_object.xml',
77 'ARB_sparse_buffer.xml',
78 'ARB_sync.xml',
79 'ARB_tessellation_shader.xml',
80 'ARB_texture_barrier.xml',
81 'ARB_texture_buffer_object.xml',
82 'ARB_texture_buffer_range.xml',
83 'ARB_texture_compression_rgtc.xml',
84 'ARB_texture_cube_map_array.xml',
85 'ARB_texture_float.xml',
86 'ARB_texture_gather.xml',
87 'ARB_texture_multisample.xml',
88 'ARB_texture_rgb10_a2ui.xml',
89 'ARB_texture_rg.xml',
90 'ARB_texture_storage_multisample.xml',
91 'ARB_texture_storage.xml',
92 'ARB_texture_view.xml',
93 'ARB_uniform_buffer_object.xml',
94 'ARB_vertex_array_object.xml',
95 'ARB_vertex_attrib_64bit.xml',
96 'ARB_vertex_attrib_binding.xml',
97 'ARB_viewport_array.xml',
98 'AMD_draw_buffers_blend.xml',
99 'AMD_performance_monitor.xml',
100 'ARB_vertex_type_2_10_10_10_rev.xml',
101 'APPLE_object_purgeable.xml',
102 'APPLE_vertex_array_object.xml',
103 'EXT_draw_buffers2.xml',
104 'EXT_external_objects.xml',
105 'EXT_external_objects_fd.xml',
106 'EXT_framebuffer_object.xml',
107 'EXT_gpu_shader4.xml',
108 'EXT_packed_depth_stencil.xml',
109 'EXT_provoking_vertex.xml',
110 'EXT_separate_shader_objects.xml',
111 'EXT_texture_array.xml',
112 'EXT_texture_integer.xml',
113 'EXT_transform_feedback.xml',
114 'EXT_window_rectangles.xml',
115 'GREMEDY_string_marker.xml',
116 'INTEL_performance_query.xml',
117 'KHR_debug.xml',
118 'KHR_context_flush_control.xml',
119 'KHR_robustness.xml',
120 'KHR_robustness_es.xml',
121 'KHR_texture_compression_astc.xml',
122 'NV_conditional_render.xml',
123 'NV_primitive_restart.xml',
124 'NV_texture_barrier.xml',
125 'NV_vdpau_interop.xml',
126 'OES_EGL_image.xml',
127 'OES_fixed_point.xml',
128 'OES_single_precision.xml',
129 'OES_texture_compression_astc.xml',
130 'GL3x.xml',
131 'GL4x.xml',
132 )
133
134 glapi_gen_depends = files(
135 'gl_XML.py',
136 'glX_XML.py',
137 'license.py',
138 'static_data.py',
139 'typeexpr.py',
140 ) + api_xml_files
141
142 glx_gen_depends = files(
143 'glX_API.xml',
144 'glX_XML.py',
145 'glX_proto_common.py',
146 ) + api_xml_files
147
148 glapi_mapi_tmp_h = custom_target(
149 'glapi_mapi_tmp.h',
150 input : [mapi_abi_py, 'gl_and_es_API.xml'],
151 output : 'glapi_mapi_tmp.h',
152 command : [prog_python2, '@INPUT0@', '--printer', 'glapi', '@INPUT1@'],
153 depend_files : glapi_gen_depends,
154 capture : true,
155 )
156
157 glprocs_h = custom_target(
158 'glprocs.h',
159 input : ['gl_procs.py', 'gl_and_es_API.xml'],
160 output : 'glprocs.h',
161 command : [prog_python2, '@INPUT0@', '-c', '-f', '@INPUT1@'],
162 depend_files : glapi_gen_depends,
163 capture : true,
164 )
165
166 glapitemp_h = custom_target(
167 'glapitemp.h',
168 input : ['gl_apitemp.py', 'gl_and_es_API.xml'],
169 output : 'glapitemp.h',
170 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
171 depend_files : glapi_gen_depends,
172 capture : true,
173 )
174
175 glapitable_h = custom_target(
176 'glapitable.h',
177 input : ['gl_table.py', 'gl_and_es_API.xml'],
178 output : 'glapitable.h',
179 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
180 depend_files : glapi_gen_depends,
181 capture : true,
182 )
183
184 glapi_gentable_c = custom_target(
185 'glapi_gentable.c',
186 input : ['gl_gentable.py', 'gl_and_es_API.xml'],
187 output : 'glapi_gentable.c',
188 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
189 depend_files : glapi_gen_depends,
190 capture : true,
191 )
192
193 main_enums_c = custom_target(
194 'enums.c',
195 input : ['gl_enums.py', files('../registry/gl.xml')],
196 output : 'enums.c',
197 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
198 capture : true,
199 )
200
201 main_api_exec_c = custom_target(
202 'api_exec.c',
203 input : ['gl_genexec.py', 'gl_and_es_API.xml'],
204 output : 'api_exec.c',
205 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
206 depend_files : files('apiexec.py') + glapi_gen_depends,
207 capture : true,
208 )
209
210 main_marshal_generated_c = custom_target(
211 'marshal_generated.c',
212 input : ['gl_marshal.py', 'gl_and_es_API.xml'],
213 output : 'marshal_generated.c',
214 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
215 depend_files : files('marshal_XML.py') + glapi_gen_depends,
216 capture : true,
217 )
218
219 glx_generated = []
220
221 foreach x : [['indirect.c', 'proto'], ['indirect.h', 'init_h'], ['indirect_init.c', 'init_c']]
222 glx_generated += custom_target(
223 x[0],
224 input : ['glX_proto_send.py', 'gl_API.xml'],
225 output : x[0],
226 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@', '-m', x[1]],
227 depend_files : glx_gen_depends,
228 capture : true,
229 )
230 endforeach
231
232 foreach x : [['indirect_size.h', ['-m', 'size_h', '--header-tag', '_INDIRECT_SIZE_H_']],
233 ['indirect_size.c', ['-m', 'size_c']]]
234 glx_generated += custom_target(
235 x[0],
236 input : ['glX_proto_size.py', 'gl_API.xml'],
237 output : x[0],
238 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@', '--only-set', x[1]],
239 depend_files : glx_gen_depends,
240 capture : true,
241 )
242 endforeach
243 glx_indirect_size_h = glx_generated[3]
244
245 glapi_x86_s = custom_target(
246 'glapi_x86.S',
247 input : ['gl_x86_asm.py', gl_and_es_api_files],
248 output : 'glapi_x86.S',
249 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
250 depend_files : glapi_gen_depends,
251 capture : true,
252 )
253
254 glapi_x86_64_s = custom_target(
255 'glapi_x86-64.S',
256 input : ['gl_x86-64_asm.py', gl_and_es_api_files],
257 output : 'glapi_x86-64.S',
258 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
259 depend_files : glapi_gen_depends,
260 capture : true,
261 )
262
263 glapi_sparc_s = custom_target(
264 'glapi_sparc.S',
265 input : ['gl_SPARC_asm.py', gl_and_es_api_files],
266 output : 'glapi_sparc.S',
267 command : [prog_python2, '@INPUT0@', '-f', '@INPUT1@'],
268 depend_files : glapi_gen_depends,
269 capture : true,
270 )