#!/usr/bin/python

# Copyright (c) 2010 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# This script is wrapper for ANGLE that adds some support for how GYP
# is invoked by ANGLE beyond what can be done in the gclient hooks.

import os
import sys

script_dir = os.path.dirname(__file__)
angle_dir = os.path.normpath(os.path.join(script_dir, os.pardir))

sys.path.append(os.path.join(angle_dir, 'third_party', 'gyp', 'pylib'))
import gyp

if __name__ == '__main__':
    args = sys.argv[1:]

    print 'Updating projects from gyp files...'
    sys.stdout.flush()

    # Set the depth to get the top-level Makefile generated into the
    # correct directory. This only has an effect on Linux.
    args.append('--depth');
    args.append('.');
    # Add common.gypi to the include path.
    args.append('-I' + os.path.join(script_dir, 'common.gypi'))
    args.append('--no-parallel')
    # Add all.gyp as the main gyp file to be generated.
    args.append(os.path.join(script_dir, 'all.gyp'))
    sys.exit(gyp.main(args))
