summaryrefslogtreecommitdiffstats
path: root/o3d
diff options
context:
space:
mode:
authorgman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 19:03:11 +0000
committergman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 19:03:11 +0000
commit42dbdc3e3a1e81c7e4b3945b858ebec13c37110e (patch)
tree972d1c912ea5a478708a26c9bc0d2947a97af263 /o3d
parent49a3e5b02b1e1ef4d8518b50a41129215c616116 (diff)
downloadchromium_src-42dbdc3e3a1e81c7e4b3945b858ebec13c37110e.zip
chromium_src-42dbdc3e3a1e81c7e4b3945b858ebec13c37110e.tar.gz
chromium_src-42dbdc3e3a1e81c7e4b3945b858ebec13c37110e.tar.bz2
Adds "gypbuild" command so developer does not have to
know the details of how to build and run tests on every platform. This is just the initial checkin with lots of TODOs Review URL: http://codereview.chromium.org/248030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27521 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d')
-rw-r--r--o3d/gypbuild.bat33
-rw-r--r--o3d/gypbuild.py55
2 files changed, 88 insertions, 0 deletions
diff --git a/o3d/gypbuild.bat b/o3d/gypbuild.bat
new file mode 100644
index 0000000..ce2f92f
--- /dev/null
+++ b/o3d/gypbuild.bat
@@ -0,0 +1,33 @@
+@echo off
+REM Copyright 2009, Google Inc.
+REM All rights reserved.
+REM
+REM Redistribution and use in source and binary forms, with or without
+REM modification, are permitted provided that the following conditions are
+REM met:
+REM
+REM * Redistributions of source code must retain the above copyright
+REM notice, this list of conditions and the following disclaimer.
+REM * Redistributions in binary form must reproduce the above
+REM copyright notice, this list of conditions and the following disclaimer
+REM in the documentation and/or other materials provided with the
+REM distribution.
+REM * Neither the name of Google Inc. nor the names of its
+REM contributors may be used to endorse or promote products derived from
+REM this software without specific prior written permission.
+REM
+REM THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+REM "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+REM LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+REM A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+REM OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+REM SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+REM LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+REM DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+REM THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+REM (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+REM OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+"%~dp0\third_party\python_24\python" -O -OO "%~dp0\gypbuild.py" %*
+
+
diff --git a/o3d/gypbuild.py b/o3d/gypbuild.py
new file mode 100644
index 0000000..2724bda
--- /dev/null
+++ b/o3d/gypbuild.py
@@ -0,0 +1,55 @@
+#!/usr/bin/python2.4
+# Copyright 2009 Google Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Builds a particlar platform so the user does not have to know platform
+# specific build commands for every single platform.
+
+# TODO(gman): Add help.
+# TODO(gman): Add cross platform modes like "debug", "opt", "test", "docs"
+# TODO(gman): Add cross platform switches like "-clean" and "-rebuild".
+# TODO(gman): Add cross platform options like "-verbose".
+# TODO(gman): Add cross platform options like "-presubmit", "-selenium",
+# "-unit_tests"
+
+import os
+import os.path
+import sys
+import subprocess
+
+
+def Execute(args):
+ """Executes an external program."""
+ # Comment the next line in for debugging.
+ # print "Execute: ", ' '.join(args)
+ print " ".join(args)
+ if subprocess.call(args) > 0:
+ raise RuntimeError('FAILED: ' + ' '.join(args))
+
+
+def main(args):
+ 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"
+ else:
+ print "Error: Unknown platform", os.name
+
+if __name__ == '__main__':
+ main(sys.argv)
+