aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.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/interpreter.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/interpreter.py')
-rw-r--r--mesonbuild/interpreter.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index 0c6d980..af2c17d 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -2290,7 +2290,11 @@ class Interpreter(InterpreterBase):
inputfile = inputfile[0]
if not isinstance(inputfile, (str, mesonlib.File)):
raise InterpreterException('Input must be a string or a file')
- ifile_abs = os.path.join(self.environment.source_dir, self.subdir, inputfile)
+ if isinstance(inputfile, str):
+ inputfile = os.path.join(self.subdir, inputfile)
+ else:
+ inputfile = inputfile.relative_name()
+ ifile_abs = os.path.join(self.environment.source_dir, inputfile)
elif 'command' in kwargs and '@INPUT@' in kwargs['command']:
raise InterpreterException('@INPUT@ used as command argument, but no input file specified.')
# Validate output
@@ -2309,7 +2313,7 @@ class Interpreter(InterpreterBase):
if inputfile is not None:
# Normalize the path of the conffile to avoid duplicates
# This is especially important to convert '/' to '\' on Windows
- conffile = os.path.normpath(os.path.join(self.subdir, inputfile))
+ conffile = os.path.normpath(inputfile)
if conffile not in self.build_def_files:
self.build_def_files.append(conffile)
os.makedirs(os.path.join(self.environment.build_dir, self.subdir), exist_ok=True)