| # Utility script to replace strings in the
|
| # generated enum sources, as needed by the build
|
| from replace import replace_multi
|
| parser = argparse.ArgumentParser(description='Replace strings in generated enum sources')
|
| parser.add_argument('--input', help='input generated temporary enum source',
|
| parser.add_argument('--output',
|
| help='output generated final enum source', required=True)
|
| args = parser.parse_args()
|
| # check whether the generated temporary enum source exists
|
| if not os.path.exists(args.input):
|
| raise SystemExit('Specified generated temporary enum source \'%s\' is invalid' % args.input)
|
| replace_items = {'_t_get_type': '_get_type',
|
| # Generate the final enum source
|
| replace_multi(args.input,
|
| if __name__ == '__main__':
|