| # Copyright 2014 PDFium 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 PDFium that adds some support for how GYP |
| # is invoked by PDFium beyond what can be done in the gclient hooks. |
| script_dir = os.path.dirname(os.path.realpath(__file__)) |
| pdfium_root = os.path.abspath(os.path.join(script_dir, os.pardir)) |
| sys.path.insert(0, os.path.join(pdfium_root, 'build', 'gyp', 'pylib')) |
| print 'Error running GYP' |
| args.append(os.path.join(script_dir, 'all.gyp')) |
| args.append(os.path.join(pdfium_root, 'build', 'standalone.gypi')) |
| args.extend(['-D', 'gyp_output_dir=out']) |
| # Set the GYP DEPTH variable to the root of the PDFium project. |
| args.append('--depth=' + os.path.relpath(pdfium_root)) |
| print 'Updating projects from gyp files...' |
| if __name__ == '__main__': |