43 def _GetLocalTargetClassFactory(name): |
43 def _GetLocalTargetClassFactory(name): |
44 return lambda: getattr(__import__(name, globals(), locals()), name+"_target") |
44 return lambda: getattr(__import__(name, globals(), locals()), name+"_target") |
45 |
45 |
46 targets = dict([(name, {"xsd": path.join(_base_path, name, "XSD"), |
46 targets = dict([(name, {"xsd": path.join(_base_path, name, "XSD"), |
47 "class": _GetLocalTargetClassFactory(name), |
47 "class": _GetLocalTargetClassFactory(name), |
48 "code": { fname: path.join(_base_path, name, fname) |
48 "code": {fname: path.join(_base_path, name, fname) |
49 for fname in listdir(path.join(_base_path, name)) |
49 for fname in listdir(path.join(_base_path, name)) |
50 if fname.startswith("plc_%s_main" % name) and |
50 if fname.startswith("plc_%s_main" % name) and |
51 fname.endswith(".c")}}) |
51 fname.endswith(".c")}}) |
52 for name in listdir(_base_path) |
52 for name in listdir(_base_path) |
53 if path.isdir(path.join(_base_path, name)) |
53 if path.isdir(path.join(_base_path, name)) |