build/pymake/make.py

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rwxr-xr-x

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

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

mercurial