aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2016-06-24 23:07:57 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2016-06-24 23:07:57 +0300
commit0733c0f9a1cd7a38e3a8f5c746e50967eeb9c9a5 (patch)
tree41fe7f2443785c8961a2840206b2380b78ca527c /mesonbuild/backend/backends.py
parent35eb8c7b9a0ef755aa228619dd04f937410743c9 (diff)
downloadmeson-0733c0f9a1cd7a38e3a8f5c746e50967eeb9c9a5.zip
meson-0733c0f9a1cd7a38e3a8f5c746e50967eeb9c9a5.tar.gz
meson-0733c0f9a1cd7a38e3a8f5c746e50967eeb9c9a5.tar.bz2
Changed run_target to take command as kwarg and add depends. This makes it behave the same as custom_target.
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 bc49966..05a3565 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -92,6 +92,7 @@ class Backend():
raise RuntimeError('No specified compiler can handle file ' + src)
def get_target_filename(self, target):
+ assert(isinstance(target, (build.BuildTarget, build.CustomTarget)))
targetdir = self.get_target_dir(target)
fname = target.get_filename()
if isinstance(fname, list):
@@ -101,6 +102,9 @@ class Backend():
filename = os.path.join(targetdir, fname)
return filename
+ def get_target_filename_abs(self, target):
+ return os.path.join(self.environment.get_build_dir(), self.get_target_filename(target))
+
def get_target_filename_for_linking(self, target):
# On some platforms (msvc for instance), the file that is used for
# dynamic linking is not the same as the dynamic library itself. This