Home | History | Annotate | Download | only in build
      1 #!/usr/bin/python
      2 
      3 # Copyright (c) 2010 The ANGLE Project Authors. All rights reserved.
      4 # Use of this source code is governed by a BSD-style license that can be
      5 # found in the LICENSE file.
      6 
      7 # This script is wrapper for ANGLE that adds some support for how GYP
      8 # is invoked by ANGLE beyond what can be done in the gclient hooks.
      9 
     10 import os
     11 import sys
     12 
     13 script_dir = os.path.dirname(__file__)
     14 angle_dir = os.path.normpath(os.path.join(script_dir, os.pardir))
     15 
     16 sys.path.append(os.path.join(angle_dir, 'third_party', 'gyp', 'pylib'))
     17 import gyp
     18 
     19 if __name__ == '__main__':
     20   args = sys.argv[1:]
     21 
     22   print 'Updating projects from gyp files...'
     23   sys.stdout.flush()
     24 
     25   # Set the depth to get the top-level Makefile generated into the
     26   # correct directory. This only has an effect on Linux.
     27   args.append('--depth');
     28   args.append('./trunk');
     29   # Add common.gypi to the include path.
     30   args.append('-I' + os.path.join(script_dir, 'common.gypi'))
     31   # Add all.gyp as the main gyp file to be generated.
     32   args.append(os.path.join(script_dir, 'all.gyp'))
     33   sys.exit(gyp.main(args))
     34