aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins/mx_archive.py
blob: 76b785fcde7d56c7da0e8d037c8d2a1eb7b27604 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
def onmx_formulas(unit, *args):
    """
    @usage: MX_FORMULAS(BinFiles...) # deprecated, matrixnet
    Create MatrixNet formulas archive
    """

    def iter_infos():
        for a in args:
            if a.endswith('.bin'):
                unit.on_mx_bin_to_info([a])
                yield a[:-3] + 'info'
            else:
                yield a

    infos = list(iter_infos())
    unit.onarchive_asm(['NAME', 'MxFormulas'] + infos)
    unit.on_mx_gen_table(infos)