summaryrefslogtreecommitdiffstats
path: root/build/pymake
diff options
context:
space:
mode:
authorThomas Groman <tgroman@nuegia.net>2020-04-20 20:56:28 -0700
committerThomas Groman <tgroman@nuegia.net>2020-04-20 20:56:28 -0700
commit508d270a4d78d491bbe1c67c309c404f547da58a (patch)
treed16e2a906501dcda7b4d268579896f03e125f553 /build/pymake
parentf9cab004186edb425a9b88ad649726605080a17c (diff)
downloadwebbrowser-508d270a4d78d491bbe1c67c309c404f547da58a.tar
webbrowser-508d270a4d78d491bbe1c67c309c404f547da58a.tar.gz
webbrowser-508d270a4d78d491bbe1c67c309c404f547da58a.tar.lz
webbrowser-508d270a4d78d491bbe1c67c309c404f547da58a.tar.xz
webbrowser-508d270a4d78d491bbe1c67c309c404f547da58a.zip
added Comm Build System
Diffstat (limited to 'build/pymake')
-rwxr-xr-xbuild/pymake/make.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/build/pymake/make.py b/build/pymake/make.py
new file mode 100755
index 0000000..99d4839
--- /dev/null
+++ b/build/pymake/make.py
@@ -0,0 +1,40 @@
+#!/usr/bin/env python
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+# This is a wrapper around mozilla-central's pymake. If that isn't found then
+# this uses client.py to pull it in.
+
+import os
+import sys
+import subprocess
+import shlex
+
+def getpath(relpath):
+ thisdir = os.path.dirname(__file__)
+ return os.path.abspath(os.path.join(thisdir, *relpath))
+
+PYMAKE = getpath(["..", "..", "platform", "build", "pymake", "make.py"])
+
+def main(args):
+ if 'TINDERBOX_OUTPUT' in os.environ:
+ # When building on mozilla build slaves, execute mozmake instead. Until bug
+ # 978211, this is the easiest, albeit hackish, way to do this.
+ mozmake = os.path.join(os.path.dirname(__file__), '..', '..',
+ 'mozmake.exe')
+ if os.path.exists(mozmake):
+ cmd = [mozmake]
+ cmd.extend(sys.argv[1:])
+ shell = os.environ.get('SHELL')
+ if shell and not shell.lower().endswith('.exe'):
+ cmd += ['SHELL=%s.exe' % shell]
+ sys.exit(subprocess.call(cmd))
+
+ if not os.path.exists(PYMAKE):
+ raise Exception("Pymake not found")
+
+ subprocess.check_call([sys.executable, PYMAKE] + args)
+
+if __name__ == "__main__":
+ main(sys.argv[1:])