summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-12-08 21:43:42 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2018-12-08 21:43:42 +0200
commit11b329426e6d617dc264cd880e939058549e8c10 (patch)
tree80dea4b18e71347d9fa2c515ddedbfa1b756044d
parentc6e022b560440fccbcfb75d529dc382b2ec017de (diff)
downloadmeson-emptycp.tar.gz
Do not write cp entry when it is empty. Closes #4602.emptycp
-rw-r--r--mesonbuild/build.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py
index 60253ed7f..1fcbc04d3 100644
--- a/mesonbuild/build.py
+++ b/mesonbuild/build.py
@@ -2143,7 +2143,10 @@ class Jar(BuildTarget):
def get_classpath_args(self):
cp_paths = [os.path.join(l.get_subdir(), l.get_filename()) for l in self.link_targets]
- return ['-cp', os.pathsep.join(cp_paths)]
+ cp_string = os.pathsep.join(cp_paths)
+ if cp_string:
+ return ['-cp', os.pathsep.join(cp_paths)]
+ return []
class CustomTargetIndex: