1#!/usr/bin/env python2.7
2
3# Copyright 2015 gRPC authors.
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9#     http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17# TODO: This should ideally be in upb submodule to avoid hardcoding this here.
18
19import re
20import os
21import sys
22import yaml
23
24out = {}
25
26try:
27    out['libs'] = [{
28        'name': 'upb',
29        'build': 'all',
30        'language': 'c',
31        'src': [
32            "third_party/utf8_range/naive.c",
33            "third_party/utf8_range/range2-neon.c",
34            "third_party/utf8_range/range2-sse.c",
35            "third_party/upb/upb/base/status.c",
36            "third_party/upb/upb/collections/array.c",
37            "third_party/upb/upb/collections/map_sorter.c",
38            "third_party/upb/upb/collections/map.c",
39            "third_party/upb/upb/hash/common.c",
40            "third_party/upb/upb/json/decode.c",
41            "third_party/upb/upb/json/encode.c",
42            "third_party/upb/upb/lex/atoi.c",
43            "third_party/upb/upb/lex/round_trip.c",
44            "third_party/upb/upb/lex/strtod.c",
45            "third_party/upb/upb/lex/unicode.c",
46            "third_party/upb/upb/mem/alloc.c",
47            "third_party/upb/upb/mem/arena.c",
48            "third_party/upb/upb/message/accessors.c",
49            "third_party/upb/upb/message/message.c",
50            "third_party/upb/upb/mini_table/common.c",
51            "third_party/upb/upb/mini_table/decode.c",
52            "third_party/upb/upb/mini_table/encode.c",
53            "third_party/upb/upb/mini_table/extension_registry.c",
54            "third_party/upb/upb/reflection/def_builder.c",
55            "third_party/upb/upb/reflection/def_pool.c",
56            "third_party/upb/upb/reflection/def_type.c",
57            "third_party/upb/upb/reflection/desc_state.c",
58            "third_party/upb/upb/reflection/enum_def.c",
59            "third_party/upb/upb/reflection/enum_reserved_range.c",
60            "third_party/upb/upb/reflection/enum_value_def.c",
61            "third_party/upb/upb/reflection/extension_range.c",
62            "third_party/upb/upb/reflection/field_def.c",
63            "third_party/upb/upb/reflection/file_def.c",
64            "third_party/upb/upb/reflection/message_def.c",
65            "third_party/upb/upb/reflection/message_reserved_range.c",
66            "third_party/upb/upb/reflection/message.c",
67            "third_party/upb/upb/reflection/method_def.c",
68            "third_party/upb/upb/reflection/oneof_def.c",
69            "third_party/upb/upb/reflection/service_def.c",
70            "third_party/upb/upb/text/encode.c",
71            "third_party/upb/upb/wire/decode_fast.c",
72            "third_party/upb/upb/wire/decode.c",
73            "third_party/upb/upb/wire/encode.c",
74            "third_party/upb/upb/wire/eps_copy_input_stream.c",
75            "third_party/upb/upb/wire/reader.c",
76            "src/core/ext/upb-generated/google/protobuf/descriptor.upb.c",
77            "src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c",
78        ],
79        'headers': [
80            "third_party/utf8_range/utf8_range.h",
81            "third_party/upb/upb/alloc.h",
82            "third_party/upb/upb/arena.h",
83            "third_party/upb/upb/array.h",
84            "third_party/upb/upb/base/descriptor_constants.h",
85            "third_party/upb/upb/base/log2.h",
86            "third_party/upb/upb/base/status.h",
87            "third_party/upb/upb/base/string_view.h",
88            "third_party/upb/upb/collections/array_internal.h",
89            "third_party/upb/upb/collections/array.h",
90            "third_party/upb/upb/collections/map_gencode_util.h",
91            "third_party/upb/upb/collections/map_internal.h",
92            "third_party/upb/upb/collections/map_sorter_internal.h",
93            "third_party/upb/upb/collections/map.h",
94            "third_party/upb/upb/collections/message_value.h",
95            "third_party/upb/upb/decode.h",
96            "third_party/upb/upb/def.h",
97            "third_party/upb/upb/def.hpp",
98            "third_party/upb/upb/encode.h",
99            "third_party/upb/upb/extension_registry.h",
100            "third_party/upb/upb/hash/common.h",
101            "third_party/upb/upb/hash/int_table.h",
102            "third_party/upb/upb/hash/str_table.h",
103            "third_party/upb/upb/json_decode.h",
104            "third_party/upb/upb/json_encode.h",
105            "third_party/upb/upb/json/decode.h",
106            "third_party/upb/upb/json/encode.h",
107            "third_party/upb/upb/lex/atoi.h",
108            "third_party/upb/upb/lex/round_trip.h",
109            "third_party/upb/upb/lex/strtod.h",
110            "third_party/upb/upb/lex/unicode.h",
111            "third_party/upb/upb/map.h",
112            "third_party/upb/upb/mem/alloc.h",
113            "third_party/upb/upb/mem/arena_internal.h",
114            "third_party/upb/upb/mem/arena.h",
115            "third_party/upb/upb/message/accessors_internal.h",
116            "third_party/upb/upb/message/accessors.h",
117            "third_party/upb/upb/message/extension_internal.h",
118            "third_party/upb/upb/message/internal.h",
119            "third_party/upb/upb/message/message.h",
120            "third_party/upb/upb/mini_table.h",
121            "third_party/upb/upb/mini_table/common_internal.h",
122            "third_party/upb/upb/mini_table/common.h",
123            "third_party/upb/upb/mini_table/decode.h",
124            "third_party/upb/upb/mini_table/encode_internal.h",
125            "third_party/upb/upb/mini_table/encode_internal.hpp",
126            "third_party/upb/upb/mini_table/enum_internal.h",
127            "third_party/upb/upb/mini_table/extension_internal.h",
128            "third_party/upb/upb/mini_table/extension_registry.h",
129            "third_party/upb/upb/mini_table/field_internal.h",
130            "third_party/upb/upb/mini_table/file_internal.h",
131            "third_party/upb/upb/mini_table/message_internal.h",
132            "third_party/upb/upb/mini_table/sub_internal.h",
133            "third_party/upb/upb/mini_table/types.h",
134            "third_party/upb/upb/msg.h",
135            "third_party/upb/upb/port/atomic.h",
136            "third_party/upb/upb/port/def.inc",
137            "third_party/upb/upb/port/undef.inc",
138            "third_party/upb/upb/port/vsnprintf_compat.h",
139            "third_party/upb/upb/reflection.h",
140            "third_party/upb/upb/reflection.hpp",
141            "third_party/upb/upb/reflection/common.h",
142            "third_party/upb/upb/reflection/def_builder_internal.h",
143            "third_party/upb/upb/reflection/def_pool_internal.h",
144            "third_party/upb/upb/reflection/def_pool.h",
145            "third_party/upb/upb/reflection/def_type.h",
146            "third_party/upb/upb/reflection/def.h",
147            "third_party/upb/upb/reflection/def.hpp",
148            "third_party/upb/upb/reflection/desc_state_internal.h",
149            "third_party/upb/upb/reflection/enum_def_internal.h",
150            "third_party/upb/upb/reflection/enum_def.h",
151            "third_party/upb/upb/reflection/enum_reserved_range_internal.h",
152            "third_party/upb/upb/reflection/enum_reserved_range.h",
153            "third_party/upb/upb/reflection/enum_value_def_internal.h",
154            "third_party/upb/upb/reflection/enum_value_def.h",
155            "third_party/upb/upb/reflection/extension_range_internal.h",
156            "third_party/upb/upb/reflection/extension_range.h",
157            "third_party/upb/upb/reflection/field_def_internal.h",
158            "third_party/upb/upb/reflection/field_def.h",
159            "third_party/upb/upb/reflection/file_def_internal.h",
160            "third_party/upb/upb/reflection/file_def.h",
161            "third_party/upb/upb/reflection/message_def_internal.h",
162            "third_party/upb/upb/reflection/message_def.h",
163            "third_party/upb/upb/reflection/message_reserved_range_internal.h",
164            "third_party/upb/upb/reflection/message_reserved_range.h",
165            "third_party/upb/upb/reflection/message.h",
166            "third_party/upb/upb/reflection/message.hpp",
167            "third_party/upb/upb/reflection/method_def_internal.h",
168            "third_party/upb/upb/reflection/method_def.h",
169            "third_party/upb/upb/reflection/oneof_def_internal.h",
170            "third_party/upb/upb/reflection/oneof_def.h",
171            "third_party/upb/upb/reflection/service_def_internal.h",
172            "third_party/upb/upb/reflection/service_def.h",
173            "third_party/upb/upb/status.h",
174            "third_party/upb/upb/string_view.h",
175            "third_party/upb/upb/text_encode.h",
176            "third_party/upb/upb/text/encode.h",
177            "third_party/upb/upb/upb.h",
178            "third_party/upb/upb/upb.hpp",
179            "third_party/upb/upb/wire/common_internal.h",
180            "third_party/upb/upb/wire/common.h",
181            "third_party/upb/upb/wire/decode_fast.h",
182            "third_party/upb/upb/wire/decode_internal.h",
183            "third_party/upb/upb/wire/decode.h",
184            "third_party/upb/upb/wire/encode.h",
185            "third_party/upb/upb/wire/eps_copy_input_stream.h",
186            "third_party/upb/upb/wire/reader.h",
187            "third_party/upb/upb/wire/swap_internal.h",
188            "third_party/upb/upb/wire/types.h",
189            "src/core/ext/upb-generated/google/protobuf/descriptor.upb.h",
190            "src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.h",
191        ],
192        'secure': False,
193    }]
194except:
195    pass
196
197print(yaml.dump(out))
198