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 21gen_xml_files = [ 22 'gen4.xml', 23 'gen45.xml', 24 'gen5.xml', 25 'gen6.xml', 26 'gen7.xml', 27 'gen75.xml', 28 'gen8.xml', 29 'gen9.xml', 30 'gen10.xml', 31] 32 33genX_xml_h = custom_target( 34 'genX_xml.h', 35 input : ['gen_zipped_file.py', gen_xml_files], 36 output : 'genX_xml.h', 37 command : [prog_python2, '@INPUT@'], 38 capture : true, 39) 40 41genX_bits_h = custom_target( 42 'genX_bits.h', 43 input : ['gen_bits_header.py', gen_xml_files], 44 output : 'genX_bits.h', 45 command : [prog_python2, '@INPUT@', '-o', '@OUTPUT@'], 46) 47 48gen_xml_pack = [] 49foreach f : gen_xml_files 50 _name = '@0@_pack.h'.format(f.split('.')[0]) 51 gen_xml_pack += custom_target( 52 _name, 53 input : ['gen_pack_header.py', f], 54 output : _name, 55 command : [prog_python2, '@INPUT@'], 56 capture : true, 57 ) 58endforeach 59