def am_find_hdrs_r(am, target, deps, hdrs, hdrs_ext, map): if target in deps: tdeps = deps[target] for dtarget in tdeps: t, ext = split_filename(dtarget) org = find_org(deps, dtarget) if org in map['SOURCES']: if ext in hdrs_ext and dtarget not in hdrs and '/' not in dtarget: hdrs.append(dtarget) am_find_hdrs_r(am, dtarget, deps, hdrs, hdrs_ext, map)