From 508d270a4d78d491bbe1c67c309c404f547da58a Mon Sep 17 00:00:00 2001 From: Thomas Groman Date: Mon, 20 Apr 2020 20:56:28 -0700 Subject: added Comm Build System --- build/pymake/make.py | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 build/pymake/make.py (limited to 'build/pymake') 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:]) -- cgit v1.2.3