aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mesonlib.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-04-04 20:57:17 +0300
committerGitHub <noreply@github.com>2017-04-04 20:57:17 +0300
commit14579ed9c512cf260ce50b303deca4b7356b92ce (patch)
tree4b04198f3d3884309e92561458dc4597f2cc066e /mesonbuild/mesonlib.py
parent99649e66908693c58fa0c015dbcce19ad8f55b19 (diff)
parent734b1973e534df142c2d6487cfae2f247bfa7dca (diff)
downloadmeson-14579ed9c512cf260ce50b303deca4b7356b92ce.zip
meson-14579ed9c512cf260ce50b303deca4b7356b92ce.tar.gz
meson-14579ed9c512cf260ce50b303deca4b7356b92ce.tar.bz2
Merge pull request #1557 from pitti/fix/configure_data-files-input
Fix configure_data files input
Diffstat (limited to 'mesonbuild/mesonlib.py')
-rw-r--r--mesonbuild/mesonlib.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py
index 7a5b962..ba52219 100644
--- a/mesonbuild/mesonlib.py
+++ b/mesonbuild/mesonlib.py
@@ -125,14 +125,14 @@ class File:
assert(isinstance(self.fname, str))
def __str__(self):
- return os.path.join(self.subdir, self.fname)
+ return self.relative_name()
def __repr__(self):
ret = '<File: {0}'
if not self.is_built:
ret += ' (not built)'
ret += '>'
- return ret.format(os.path.join(self.subdir, self.fname))
+ return ret.format(self.relative_name())
@staticmethod
def from_source_file(source_root, subdir, fname):
@@ -150,15 +150,15 @@ class File:
def rel_to_builddir(self, build_to_src):
if self.is_built:
- return os.path.join(self.subdir, self.fname)
+ return self.relative_name()
else:
return os.path.join(build_to_src, self.subdir, self.fname)
def absolute_path(self, srcdir, builddir):
+ absdir = srcdir
if self.is_built:
- return os.path.join(builddir, self.subdir, self.fname)
- else:
- return os.path.join(srcdir, self.subdir, self.fname)
+ absdir = builddir
+ return os.path.join(absdir, self.relative_name())
def endswith(self, ending):
return self.fname.endswith(ending)