summaryrefslogtreecommitdiffstats
path: root/build/plugins/build_mn_files.py
blob: e5681fac4c21b91cc804e8c942ff94b1a12b7f4c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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])