diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py index 286afa924..5c2f70916 100644 --- a/mesonbuild/backend/backends.py +++ b/mesonbuild/backend/backends.py @@ -381,7 +381,11 @@ class Backend(): return exe_arr def eval_custom_target_command(self, target, absolute_paths=False): - ofilenames = [os.path.join(self.get_target_dir(target), i) for i in target.output] + if not absolute_paths: + ofilenames = [os.path.join(self.get_target_dir(target), i) for i in target.output] + else: + ofilenames = [os.path.join(self.environment.get_build_dir(), self.get_target_dir(target), i) \ + for i in target.output] srcs = [] outdir = self.get_target_dir(target) # Many external programs fail on empty arguments.