Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 #!/usr/bin/env python
3 """
4 make.py
6 A drop-in or mostly drop-in replacement for GNU make.
7 """
9 import sys, os
10 import pymake.command, pymake.process
12 import gc
14 if __name__ == '__main__':
15 if 'TINDERBOX_OUTPUT' in os.environ:
16 # When building on mozilla build slaves, execute mozmake instead. Until bug
17 # 978211, this is the easiest, albeit hackish, way to do this.
18 import subprocess
19 mozmake = os.path.join(os.path.dirname(__file__), '..', '..',
20 'mozmake.exe')
21 if os.path.exists(mozmake):
22 cmd = [mozmake]
23 cmd.extend(sys.argv[1:])
24 shell = os.environ.get('SHELL')
25 if shell and not shell.lower().endswith('.exe'):
26 cmd += ['SHELL=%s.exe' % shell]
27 sys.exit(subprocess.call(cmd))
29 sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
30 sys.stderr = os.fdopen(sys.stderr.fileno(), 'w', 0)
32 gc.disable()
34 pymake.command.main(sys.argv[1:], os.environ, os.getcwd(), cb=sys.exit)
35 pymake.process.ParallelContext.spin()
36 assert False, "Not reached"