aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-07-01 14:43:51 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-07-01 20:50:47 +0530
commit64cb70441bce61da3258fca93df5baac2eb310ea (patch)
tree594e946f136a10cd6b550bd4e7f64163548a5e16 /mesonbuild/backend/backends.py
parent2e986ae30dbcc4505db36497adf943d119bc5a4e (diff)
downloadmeson-64cb70441bce61da3258fca93df5baac2eb310ea.zip
meson-64cb70441bce61da3258fca93df5baac2eb310ea.tar.gz
meson-64cb70441bce61da3258fca93df5baac2eb310ea.tar.bz2
CustomTarget: Use mesonlib.File objects as-is in the command to be run
This allows us to output either the relative or absolute path as requested. Fixes usage of configure_file inside CustomTarget commands with the VS backends.
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index a9d9213..ded3ea2 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -500,6 +500,10 @@ class Backend():
# it assumes that it is in path, so always give it a full path.
tmp = i.get_filename()[0]
i = os.path.join(self.get_target_dir(i), tmp)
+ elif isinstance(i, mesonlib.File):
+ i = os.path.join(i.subdir, i.fname)
+ if absolute_paths:
+ i = os.path.join(self.environment.get_build_dir(), i)
# FIXME: str types are blindly added and ignore the 'absolute_paths' argument
elif not isinstance(i, str):
err_msg = 'Argument {0} is of unknown type {1}'