aboutsummaryrefslogtreecommitdiff
path: root/build.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-09-20 19:51:16 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-09-20 19:51:16 +0300
commit5297516c913ed67648058ffc90637ad5e2d39411 (patch)
treea05ff1b38055b4462af5264751b0aa0d9706227c /build.py
parentd17083605196423a2adcdbb3723478084ad892ea (diff)
downloadmeson-5297516c913ed67648058ffc90637ad5e2d39411.zip
meson-5297516c913ed67648058ffc90637ad5e2d39411.tar.gz
meson-5297516c913ed67648058ffc90637ad5e2d39411.tar.bz2
Changed target naming algorithm to avoid Windows file name forbidden characters.
Diffstat (limited to 'build.py')
-rw-r--r--build.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/build.py b/build.py
index 6d6c013..e838b67 100644
--- a/build.py
+++ b/build.py
@@ -170,7 +170,13 @@ class BuildTarget():
self.validate_sources()
def get_id(self):
- return self.subproject + ':' + self.name + self.type_suffix()
+ # This ID must also be a valid file name on all OSs.
+ # It should also avoid shell metacharacters for obvious
+ # reasons.
+ base = self.name + self.type_suffix()
+ if self.subproject == '':
+ return base
+ return self.subproject + '@@' + base
def check_unknown_kwargs(self, kwargs):
# Override this method in derived classes that have more