Skip to content

Commit

Permalink
android: Fix path separator for non-cygwin Windows ndk-build.
Browse files Browse the repository at this point in the history
  • Loading branch information
okumura committed Mar 14, 2014
1 parent 00f5497 commit 22e62bd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pylib/gyp/generator/android.py
Expand Up @@ -892,12 +892,15 @@ def WriteList(self, value_list, variable=None, prefix='',
"""
values = ''
if value_list:
value_list = [quoter(prefix + l) for l in value_list]
value_list = [self.FixPathSeparator(quoter(prefix + l)) for l in value_list]
if local_pathify:
value_list = [self.LocalPathify(l) for l in value_list]
value_list = [self.FixPathSeparator(self.LocalPathify(l)) for l in value_list]
values = ' \\\n\t' + ' \\\n\t'.join(value_list)
self.fp.write('%s :=%s\n\n' % (variable, values))

def FixPathSeparator(self, path):
# On Windows, ndk-build cannot recognize path separator '\'.
return path.replace('\\', '/')

def WriteLn(self, text=''):
self.fp.write(text + '\n')
Expand Down

0 comments on commit 22e62bd

Please sign in to comment.