diff options
author | alexv-smirnov <[email protected]> | 2023-06-13 11:05:01 +0300 |
---|---|---|
committer | alexv-smirnov <[email protected]> | 2023-06-13 11:05:01 +0300 |
commit | bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0 (patch) | |
tree | 1d1df72c0541a59a81439842f46d95396d3e7189 /build/plugins/bundle.py | |
parent | 8bfdfa9a9bd19bddbc58d888e180fbd1218681be (diff) |
add ymake export to ydb
Diffstat (limited to 'build/plugins/bundle.py')
-rw-r--r-- | build/plugins/bundle.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/build/plugins/bundle.py b/build/plugins/bundle.py new file mode 100644 index 00000000000..69e3e016812 --- /dev/null +++ b/build/plugins/bundle.py @@ -0,0 +1,22 @@ +import os + + +def onbundle(unit, *args): + """ + @usage BUNDLE(<Dir [NAME Name]>...) + + Brings build artefact from module Dir under optional Name to the current module (e.g. UNION) + If NAME is not specified, the name of the Dir's build artefact will be preserved + It makes little sense to specify BUNDLE on non-final targets and so this may stop working without prior notice. + Bundle on multimodule will select final target among multimodule variants and will fail if there are none or more than one. + """ + i = 0 + while i < len(args): + if i + 2 < len(args) and args[i + 1] == "NAME": + target, name = args[i], args[i + 2] + i += 3 + else: + target, name = args[i], os.path.basename(args[i]) + i += 1 + + unit.on_bundle_target([target, name]) |