aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/ninjabackend.py
diff options
context:
space:
mode:
authorRobert Bragg <robert@impossible.com>2018-02-08 00:25:33 +0000
committerNiclas Moeslund Overby <noverby@prozum.dk>2018-05-16 14:53:30 +0200
commit65b730bd59790338a6bfad6f976ff74b12d6bc13 (patch)
tree1f8d66753de4dd78aa16f83dc3f6a445bea535f6 /mesonbuild/backend/ninjabackend.py
parent8a9f7cf1332a0be9b2e90d39483c6aa7c67fffee (diff)
downloadmeson-65b730bd59790338a6bfad6f976ff74b12d6bc13.zip
meson-65b730bd59790338a6bfad6f976ff74b12d6bc13.tar.gz
meson-65b730bd59790338a6bfad6f976ff74b12d6bc13.tar.bz2
ninja: pass separated paths to javac -sourcepath
The -sourcepath option can't be passed multiple times to javac, since it simply overrides prior arguments. Instead -sourcepath takes a colon (or semi-colon on windows) separated list of paths.
Diffstat (limited to 'mesonbuild/backend/ninjabackend.py')
-rw-r--r--mesonbuild/backend/ninjabackend.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index c508cec..cb51f3b 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -1029,9 +1029,12 @@ int dummy;
args += self.build.get_project_args(compiler, target.subproject)
args += target.get_java_args()
args += compiler.get_output_args(self.get_target_private_dir(target))
+ sourcepath = ''
for i in target.include_dirs:
for idir in i.get_incdirs():
- args += ['-sourcepath', os.path.join(self.build_to_src, i.curdir, idir)]
+ sourcepath += os.path.join(self.build_to_src, i.curdir, idir) + os.pathsep
+ if sourcepath != '':
+ args += ['-sourcepath', sourcepath]
rel_src = src.rel_to_builddir(self.build_to_src)
plain_class_path = src.fname[:-4] + 'class'
rel_obj = os.path.join(self.get_target_private_dir(target), plain_class_path)