aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins/build_mn_files.py
diff options
context:
space:
mode:
authoralexv-smirnov <alex@ydb.tech>2023-06-13 11:05:01 +0300
committeralexv-smirnov <alex@ydb.tech>2023-06-13 11:05:01 +0300
commitbf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0 (patch)
tree1d1df72c0541a59a81439842f46d95396d3e7189 /build/plugins/build_mn_files.py
parent8bfdfa9a9bd19bddbc58d888e180fbd1218681be (diff)
downloadydb-bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0.tar.gz
add ymake export to ydb
Diffstat (limited to 'build/plugins/build_mn_files.py')
-rw-r--r--build/plugins/build_mn_files.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/build/plugins/build_mn_files.py b/build/plugins/build_mn_files.py
new file mode 100644
index 0000000000..4da76f1852
--- /dev/null
+++ b/build/plugins/build_mn_files.py
@@ -0,0 +1,29 @@
+from os.path import basename, splitext
+
+
+def on_build_mns_files(unit, *args):
+ files = []
+ name = ''
+ ranking_suffix = ''
+ check = ''
+ index = 0
+ fml_unused_tool = ''
+ while index < len(args):
+ if args[index] == 'NAME':
+ index += 1
+ name = args[index]
+ elif args[index] == 'RANKING_SUFFIX':
+ index += 1
+ ranking_suffix = args[index]
+ elif args[index] == 'CHECK':
+ check = 'CHECK'
+ fml_unused_tool = unit.get('FML_UNUSED_TOOL') or '$FML_UNUSED_TOOL'
+ else:
+ files.append(args[index])
+ index += 1
+
+ for filename in files:
+ file_basename, _ = splitext(basename(filename))
+ asmdataname = "staticMn{0}{1}Ptr".format(ranking_suffix, file_basename)
+ output_name = 'mn.staticMn{0}{1}Ptr.cpp'.format(ranking_suffix, file_basename)
+ unit.on_build_mns_file([filename, name, output_name, ranking_suffix, check, fml_unused_tool, asmdataname])