if __name__ == '__main__':
arg = 0
args = []
+ target_os = 'linux'
for i in range(len(sys.argv)):
if arg > 0:
args[arg] += " " + sys.argv[i];
+ if sys.argv[i] in ('target_os="tizen"'):
+ target_os = 'tizen'
continue
if sys.argv[i] in ("--args="):
args.append(sys.argv[i])
subdir = 'win'
elif sys.platform == 'darwin':
subdir = 'mac'
- elif host_arch.startswith('arm'):
- buildtools_path = os.path.join(buildtools_path, "../tizen_src/buildtools/")
- subdir = 'arm'
- elif sys.platform.startswith('linux'):
- subdir = 'linux64'
+ elif target_os == 'linux':
+ subdir = 'linux64'
+ elif target_os == 'tizen':
+ buildtools_path = os.path.join(buildtools_path, "../tizen_src/")
+ subdir = 'buildtools'
else:
raise Error('Unknown platform: ' + sys.platform)
exeSuffix = ''
if sys.platform.startswith(('cygwin', 'win')):
exeSuffix = '.exe'
- elif host_arch.startswith('arm'):
- exeSuffix = '.arm'
+ elif target_os == 'linux' or target_os == 'tizen':
+ exeSuffix = ''
gn_path = os.path.join(bin_path, 'gn' + exeSuffix)
if not os.path.exists(gn_path):
else:
print 'Updating projects from gn files...'
sys.exit(subprocess.call([gn_path] + args[1:]))
-