summaryrefslogtreecommitdiff
path: root/build/pymake/make.py
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2022-02-12 13:57:21 -0600
committerMatt A. Tobin <email@mattatobin.com>2022-02-12 13:57:21 -0600
commitba7d67bb0711c9066c71bd33e55d9a5d2f9b2cbf (patch)
treea5c0cfad71c17114c78d8a7d1f31112eb53896df /build/pymake/make.py
parentc054e324210895e7e2c5b3e84437cba43f201ec8 (diff)
downloadpalemoon-gre-ba7d67bb0711c9066c71bd33e55d9a5d2f9b2cbf.tar.gz
Lay down Pale Moon 30
Diffstat (limited to 'build/pymake/make.py')
-rw-r--r--build/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 100644
index 000000000..99d483988
--- /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:])