diff options
author | Charles Brunet <charles.brunet@optelgroup.com> | 2023-08-10 14:35:18 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2023-08-18 00:36:49 -0400 |
commit | 7cbe37ebd94e9df984328fd9722cc2fc9f61651b (patch) | |
tree | beb5045353c7fc7da5fd7db01e95db3af2073f1c /mesonbuild/backend | |
parent | 88747b4f8d4bb35c82c8855ecbd6a29ea419b6fd (diff) | |
download | meson-7cbe37ebd94e9df984328fd9722cc2fc9f61651b.zip meson-7cbe37ebd94e9df984328fd9722cc2fc9f61651b.tar.gz meson-7cbe37ebd94e9df984328fd9722cc2fc9f61651b.tar.bz2 |
Add more descriptive description to CustomTarget
Allow modules using CustomTarget to modify the command description used by ninja backend. This result in more precise logs when building a project.
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 72c8265..1d563a2 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -1147,7 +1147,7 @@ class NinjaBackend(backends.Backend): deps.append(os.path.join(self.get_target_dir(i), output)) return deps - def generate_custom_target(self, target): + def generate_custom_target(self, target: build.CustomTarget): self.custom_target_generator_inputs(target) (srcs, ofilenames, cmd) = self.eval_custom_target_command(target) deps = self.unwrap_dep_list(target) @@ -1185,7 +1185,7 @@ class NinjaBackend(backends.Backend): elem.add_item('pool', 'console') full_name = Path(target.subdir, target.name).as_posix() elem.add_item('COMMAND', cmd) - elem.add_item('description', f'Generating {full_name} with a custom command{cmd_type}') + elem.add_item('description', target.description.format(full_name) + cmd_type) self.add_build(elem) self.processed_targets.add(target.get_id()) |