michael@0: #!/usr/bin/python michael@0: michael@0: # Copyright (c) 2010 The ANGLE Project Authors. All rights reserved. michael@0: # Use of this source code is governed by a BSD-style license that can be michael@0: # found in the LICENSE file. michael@0: michael@0: # This script is wrapper for ANGLE that adds some support for how GYP michael@0: # is invoked by ANGLE beyond what can be done in the gclient hooks. michael@0: michael@0: import os michael@0: import sys michael@0: michael@0: script_dir = os.path.dirname(__file__) michael@0: angle_dir = os.path.normpath(os.path.join(script_dir, os.pardir)) michael@0: michael@0: sys.path.append(os.path.join(angle_dir, 'third_party', 'gyp', 'pylib')) michael@0: import gyp michael@0: michael@0: if __name__ == '__main__': michael@0: args = sys.argv[1:] michael@0: michael@0: print 'Updating projects from gyp files...' michael@0: sys.stdout.flush() michael@0: michael@0: # Set the depth to get the top-level Makefile generated into the michael@0: # correct directory. This only has an effect on Linux. michael@0: args.append('--depth'); michael@0: args.append('./trunk'); michael@0: # Add common.gypi to the include path. michael@0: args.append('-I' + os.path.join(script_dir, 'common.gypi')) michael@0: # Add all.gyp as the main gyp file to be generated. michael@0: args.append(os.path.join(script_dir, 'all.gyp')) michael@0: sys.exit(gyp.main(args))