diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2015-09-20 19:51:16 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2015-09-20 19:51:16 +0300 |
commit | 5297516c913ed67648058ffc90637ad5e2d39411 (patch) | |
tree | a05ff1b38055b4462af5264751b0aa0d9706227c | |
parent | d17083605196423a2adcdbb3723478084ad892ea (diff) | |
download | meson-5297516c913ed67648058ffc90637ad5e2d39411.zip meson-5297516c913ed67648058ffc90637ad5e2d39411.tar.gz meson-5297516c913ed67648058ffc90637ad5e2d39411.tar.bz2 |
Changed target naming algorithm to avoid Windows file name forbidden characters.
-rw-r--r-- | build.py | 8 | ||||
-rw-r--r-- | vs2010backend.py | 2 |
2 files changed, 8 insertions, 2 deletions
@@ -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 diff --git a/vs2010backend.py b/vs2010backend.py index e834584..c909c35 100644 --- a/vs2010backend.py +++ b/vs2010backend.py @@ -123,7 +123,7 @@ class Vs2010Backend(backends.Backend): def generate_projects(self): projlist = [] for name, target in self.build.targets.items(): - outdir = os.path.join(self.environment.get_build_dir(), target.subdir) + outdir = os.path.join(self.environment.get_build_dir(), self.get_target_dir(target)) fname = name + '.vcxproj' relname = os.path.join(target.subdir, fname) projfile = os.path.join(outdir, fname) |