Skip to content

Commit

Permalink
Merge branch 'mr/jicquel/github#91' into 'master'
Browse files Browse the repository at this point in the history
github#91: gprproject/gprbuild.py GPRTool.__init__ : allows self.target to be computed on...

See merge request eng/toolchain/gnatcoll-core!168
  • Loading branch information
Jicquel committed Dec 16, 2024
2 parents 10b2aef + 99719e1 commit 34b7cdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gprproject/gprbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ def __init__(
if self.original_target:
gprconfig_cmd.append(f"--target={self.original_target}")
gprconfig_output = self.capture(gprconfig_cmd)
self.target = re.findall(r" 1 normalized_target:(\S*)", gprconfig_output)[0]
self.target = re.findall(r"\*\s+\d+ normalized_target:(\S*)", gprconfig_output)[0]

# Compute default prefix
if prefix:
self.prefix = os.path.abspath(prefix)
else:
self.prefix = re.findall(r" 1 path:(.*)", gprconfig_output)[0].strip()
self.prefix = re.findall(r"\*\s+\d+ path:(.*)", gprconfig_output)[0].strip()
if self.prefix.endswith(os.sep):
self.prefix = os.path.dirname(os.path.dirname(self.prefix))
else:
Expand Down

0 comments on commit 34b7cdd

Please sign in to comment.