diff options
author | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-29 22:11:11 +0000 |
---|---|---|
committer | gman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-29 22:11:11 +0000 |
commit | 95245a86881c097846c9887f00d070926c80a930 (patch) | |
tree | 26c7c28d3a273eddbb03ed1f3752aac8126282d2 /o3d | |
parent | 3af360eaec25643097aa068871bb2a8f34a94d7a (diff) | |
download | chromium_src-95245a86881c097846c9887f00d070926c80a930.zip chromium_src-95245a86881c097846c9887f00d070926c80a930.tar.gz chromium_src-95245a86881c097846c9887f00d070926c80a930.tar.bz2 |
Add osx support to gypbuild
Step 1. It builds on OSX and I guessed on linux
Will try that next. Also will start adding place
holders for options next
Review URL: http://codereview.chromium.org/251034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27542 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rwxr-xr-x | o3d/gypbuild | 40 | ||||
-rwxr-xr-x[-rw-r--r--] | o3d/gypbuild.py | 15 |
2 files changed, 49 insertions, 6 deletions
diff --git a/o3d/gypbuild b/o3d/gypbuild new file mode 100755 index 0000000..b1b2f3a --- /dev/null +++ b/o3d/gypbuild @@ -0,0 +1,40 @@ +#!/bin/bash +# Copyright 2009, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +readonly SCRIPT_DIR="$(dirname "$0")" +readonly SCRIPT_DIR_ABS="$(cd "$SCRIPT_DIR" ; pwd)" + +# Use the batch file as an entry point if on cygwin. +if [ "$OSTYPE" = "cygwin" ]; then + "$SCRIPT_DIR_ABS/gypbuild.bat" "$@" +else + python "$SCRIPT_DIR_ABS/gypbuild.py" "$@" +fi + 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
|