25 lines
633 B
Python
25 lines
633 B
Python
Import('env')
|
|
|
|
import os
|
|
from opendbc.can.process_dbc import process
|
|
|
|
for x in os.listdir('../'):
|
|
if x.endswith(".dbc"):
|
|
def build(target, source, env):
|
|
process(source[0].path, target[0].path)
|
|
in_fn = os.path.join('../', x)
|
|
out_fn = os.path.join('dbc_out', x.replace(".dbc", ".cc"))
|
|
env.Command(out_fn, in_fn, build)
|
|
|
|
"""
|
|
dbcs = []
|
|
for x in os.listdir('../'):
|
|
if x.endswith(".dbc"):
|
|
dbcs.append(env.Command(
|
|
[os.path.join('dbc_out', x.replace(".dbc", ".cc"))],
|
|
[os.path.join('../', x)],
|
|
"python3 opendbc/can/process_dbc.py ../ $SOURCE"))
|
|
print(dbcs)
|
|
"""
|
|
|