diff options
Diffstat (limited to 'o3d/gypbuild.py')
-rwxr-xr-x[-rw-r--r--] | o3d/gypbuild.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/o3d/gypbuild.py b/o3d/gypbuild.py index 2724bda..3eecfa5 100644..100755 --- a/o3d/gypbuild.py +++ b/o3d/gypbuild.py @@ -1,4 +1,4 @@ -#!/usr/bin/python2.4
+#! /usr/bin/env python
# Copyright 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -27,6 +27,7 @@ import os import os.path
import sys
import subprocess
+import platform
def Execute(args):
@@ -39,14 +40,16 @@ def Execute(args): def main(args):
+ os.chdir('build')
if os.name == 'nt':
- os.chdir('build')
Execute(['msbuild',
os.path.abspath('all.sln')] + args[1:])
- elif os.name == 'mac':
- print "Error: Need code for mac"
- elif os.name == 'posix':
- print "Error: Need code for posix"
+ elif platform.system() == 'Darwin':
+ Execute(['xcodebuild',
+ '-project', 'all.xcodeproj'])
+ elif platform.system() == 'Linux':
+ Execute(['hammer',
+ '-f', 'all_main.scons'])
else:
print "Error: Unknown platform", os.name
|