Fix display of generator

pull/11583/head
Charles Brunet 1 year ago committed by Eli Schwartz
parent 3784f72973
commit 3e3d5e97c3
  1. 4
      mesonbuild/backend/ninjabackend.py
  2. 6
      mesonbuild/build.py

@ -2659,10 +2659,10 @@ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47485'''))
what = f'{sole_output!r}'
else:
# since there are multiple outputs, we log the source that caused the rebuild
what = f'from {sole_output!r}.'
what = f'from {sole_output!r}'
if reason:
reason = f' (wrapped by meson {reason})'
elem.add_item('DESC', f'Generating {what}{reason}.')
elem.add_item('DESC', f'Generating {what}{reason}')
if isinstance(exe, build.BuildTarget):
elem.add_dep(self.get_target_filename(exe))

@ -1716,6 +1716,9 @@ class FileInTargetPrivateDir:
def __init__(self, fname: str):
self.fname = fname
def __str__(self) -> str:
return self.fname
class FileMaybeInTargetPrivateDir:
"""Union between 'File' and 'FileInTargetPrivateDir'"""
@ -1736,6 +1739,9 @@ class FileMaybeInTargetPrivateDir:
raise RuntimeError('Unreachable code')
return self.inner.absolute_path(srcdir, builddir)
def __str__(self) -> str:
return self.fname
class Generator(HoldableObject):
def __init__(self, exe: T.Union['Executable', programs.ExternalProgram],
arguments: T.List[str],

Loading…
Cancel
Save