aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-04-10 18:37:39 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-04-10 18:37:39 +0300
commita8803faf0477260c431df2b47e36641b45d41af0 (patch)
treee1cdbaa4327d2e8f5187e26e832297f113b723c8
parente240c4abaa8049bfe1e50a96a4e851aef1a417f8 (diff)
downloadmeson-a8803faf0477260c431df2b47e36641b45d41af0.zip
meson-a8803faf0477260c431df2b47e36641b45d41af0.tar.gz
meson-a8803faf0477260c431df2b47e36641b45d41af0.tar.bz2
Vs2010 fix from mfrischknecht. Closes #98.
-rw-r--r--authors.txt2
-rw-r--r--vs2010backend.py6
2 files changed, 7 insertions, 1 deletions
diff --git a/authors.txt b/authors.txt
index 0a928d6..63f3bac 100644
--- a/authors.txt
+++ b/authors.txt
@@ -12,3 +12,5 @@ Robin McCorkell
Axel Waggershauser
Igor Gnatenko
Hemmo Nieminen
+mfrischknecht
+
diff --git a/vs2010backend.py b/vs2010backend.py
index 062e09a..c2f07bd 100644
--- a/vs2010backend.py
+++ b/vs2010backend.py
@@ -143,7 +143,11 @@ class Vs2010Backend(backends.Backend):
def target_to_build_root(self, target):
if target.subdir == '':
return ''
- return '/'.join(['..']*(len(os.path.split(target.subdir))-1))
+
+ directories = os.path.split(target.subdir)
+ directories = list(filter(bool,directories)) #Filter out empty strings
+
+ return '/'.join(['..']*len(directories))
def special_quote(self, arr):
return ['&quot;%s&quot;' % i for i in arr]