(self)
| 56 | return self.abspath(result) if real else result |
| 57 | |
| 58 | def objects(self) -> List[Path]: |
| 59 | tokens = self.cmd.split() |
| 60 | |
| 61 | if self.is_link(): |
| 62 | result = {token for token in tokens if token.endswith(".o")} |
| 63 | else: |
| 64 | try: |
| 65 | idx = tokens.index("-o") |
| 66 | except ValueError: |
| 67 | raise RuntimeError(f"Unable to find objects in ({self.cmd})") |
| 68 | result = { |
| 69 | tokens[idx + 1], |
| 70 | } |
| 71 | |
| 72 | return [self.abspath(Path(obj)) for obj in result] |
| 73 | |
| 74 | def sources(self, real: bool = True) -> List[Path]: |
| 75 | tokens = self.cmd.split() |
no test coverage detected