aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-05-17 00:23:43 +0300
committerGitHub <noreply@github.com>2018-05-17 00:23:43 +0300
commit4d7ff404608af3f0ff1cef6dde6cf71b83608dc6 (patch)
treeaa58103455080f6793cf6b282bf35fb3360b3c06 /mesonbuild
parent559286a0daa87056594a9dcbc8540f5a7bf6f8f8 (diff)
parentef16fb2e973cf7d5aa4850decdc404be5389b8f3 (diff)
downloadmeson-4d7ff404608af3f0ff1cef6dde6cf71b83608dc6.zip
meson-4d7ff404608af3f0ff1cef6dde6cf71b83608dc6.tar.gz
meson-4d7ff404608af3f0ff1cef6dde6cf71b83608dc6.tar.bz2
Merge pull request #3577 from noverby/wip/rib/java-codegen
Include target build directory while compiling Java, for generated code dependencies (Polished)
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/backend/ninjabackend.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index c508cec..c7e194e 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -1029,9 +1029,13 @@ 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))
+ curdir = target.get_subdir()
+ sourcepath = os.path.join(self.build_to_src, curdir) + os.pathsep
+ sourcepath += os.path.normpath(curdir) + os.pathsep
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
+ 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)