diff options
author | arcadia-devtools <[email protected]> | 2022-06-14 12:13:19 +0300 |
---|---|---|
committer | arcadia-devtools <[email protected]> | 2022-06-14 12:13:19 +0300 |
commit | c4f810ee977babcf8bfc5247bfb4a93449c730d6 (patch) | |
tree | 7aa3fed0fbf2209b068d341d5cd0514ea94f1039 /build/plugins | |
parent | 7d5e58f37cd4848e9a05084f589b2578de2077a3 (diff) |
intermediate changes
ref:b2fca828a7deda9abd3be6b09fa05f30e50c9299
Diffstat (limited to 'build/plugins')
-rw-r--r-- | build/plugins/java.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/build/plugins/java.py b/build/plugins/java.py index 6dc4a72c730..74d280dc29d 100644 --- a/build/plugins/java.py +++ b/build/plugins/java.py @@ -328,15 +328,17 @@ def extract_words(words, keys): def parse_words(words): kv = extract_words(words, {'OUT', 'TEMPLATE'}) + if not 'TEMPLATE' in kv: + kv['TEMPLATE'] = ['template.tmpl'] ws = [] for item in ('OUT', 'TEMPLATE'): for i, word in list(enumerate(kv[item])): if word == 'CUSTOM_PROPERTY': ws += kv[item][i:] kv[item] = kv[item][:i] - tepmlates = kv['TEMPLATE'] + templates = kv['TEMPLATE'] outputs = kv['OUT'] - if len(outputs) < len(tepmlates): + if len(outputs) < len(templates): ymake.report_configure_error('To many arguments for TEMPLATE parameter') return if ws and ws[0] != 'CUSTOM_PROPERTY': @@ -358,7 +360,7 @@ def parse_words(words): else: ymake.report_configure_error('CUSTOM_PROPERTY "{}" value is not specified'.format(p[0])) for i, o in enumerate(outputs): - yield o, tepmlates[min(i, len(tepmlates) - 1)], props + yield o, templates[min(i, len(templates) - 1)], props def on_ymake_generate_script(unit, *args): |