def _DoesTargetDependOnMatchingTargets(target):
  """Returns true if |target| or any of its dependencies is one of the
  targets containing the files supplied as input to analyzer. This updates
  |matches| of the Targets as it recurses.
  target: the Target to look for."""
  if target.match_status == MATCH_STATUS_DOESNT_MATCH:
    return False
  if target.match_status == MATCH_STATUS_MATCHES or \
      target.match_status == MATCH_STATUS_MATCHES_BY_DEPENDENCY:
    return True
  for dep in target.deps:
    if _DoesTargetDependOnMatchingTargets(dep):
      target.match_status = MATCH_STATUS_MATCHES_BY_DEPENDENCY
      print '\t', target.name, 'matches by dep', dep.name
      return True
  target.match_status = MATCH_STATUS_DOESNT_MATCH
  return False
dataset/ETHPy150Open adblockplus/gyp/pylib/gyp/generator/analyzer.py/_DoesTargetDependOnMatchingTargets/original