targets/__init__.py
changeset 1457 ff7cfce737ca
parent 1456 e723c1dd6faa
child 1571 486f94a8032c
equal deleted inserted replaced
1456:e723c1dd6faa 1457:ff7cfce737ca
    37     return lambda:getattr(__import__(name,globals(),locals()), name+"_target")
    37     return lambda:getattr(__import__(name,globals(),locals()), name+"_target")
    38 
    38 
    39 targets = dict([(name, {"xsd":path.join(_base_path, name, "XSD"), 
    39 targets = dict([(name, {"xsd":path.join(_base_path, name, "XSD"), 
    40                         "class":_GetLocalTargetClassFactory(name),
    40                         "class":_GetLocalTargetClassFactory(name),
    41                         "code": { fname: path.join(_base_path, name, fname) 
    41                         "code": { fname: path.join(_base_path, name, fname) 
    42                                     for fname in listdir(path.join(_base_path, name))
    42                            for fname in listdir(path.join(_base_path, name))
    43                                       if fname.startswith("plc_%s_main.c"%name)}})
    43                              if fname.startswith("plc_%s_main"%name) and
       
    44                                fname.endswith(".c")}})
    44                 for name in listdir(_base_path) 
    45                 for name in listdir(_base_path) 
    45                     if path.isdir(path.join(_base_path, name)) 
    46                     if path.isdir(path.join(_base_path, name)) 
    46                        and not name.startswith("__")])
    47                        and not name.startswith("__")])
    47 
    48 
    48 toolchains = {"gcc":  path.join(_base_path, "XSD_toolchain_gcc"),
    49 toolchains = {"gcc":  path.join(_base_path, "XSD_toolchain_gcc"),