Generate shim headers for libpng

BUG=165264

Review URL: https://codereview.chromium.org/11470020

git-svn-id: http://src.chromium.org/svn/trunk/src/build@173618 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
phajdan.jr@chromium.org 2012-12-18 01:51:37 +00:00
Родитель 1001eacbad
Коммит 048d44a1a7
2 изменённых файлов: 46 добавлений и 0 удалений

Просмотреть файл

@ -21,6 +21,7 @@ sys.path.insert(0, os.path.join(chrome_src, 'tools', 'gyp', 'pylib'))
import gyp
# Add paths so that pymod_do_main(...) can import files.
sys.path.insert(1, os.path.join(chrome_src, 'tools', 'generate_shim_headers'))
sys.path.insert(1, os.path.join(chrome_src, 'tools', 'grit'))
sys.path.insert(1, os.path.join(chrome_src, 'chrome', 'tools', 'build'))
sys.path.insert(1, os.path.join(chrome_src, 'native_client', 'build'))

45
shim_headers.gypi Normal file
Просмотреть файл

@ -0,0 +1,45 @@
# Copyright (c) 2012 The Chromium 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 file is meant to be included into a target to handle shim headers
# in a consistent manner. To use this the following variables need to be
# defined:
# headers_root_path: string: path to directory containing headers
# header_filenames: list: list of header file names
{
'variables': {
'shim_headers_path': '<(INTERMEDIATE_DIR)/shim_headers',
},
'direct_dependent_settings': {
'include_dirs+': [
'<(shim_headers_path)',
],
},
'actions': [
{
'variables': {
'generator_path': '<(DEPTH)/tools/generate_shim_headers/generate_shim_headers.py',
'generator_args': [
'--headers-root', '<(headers_root_path)',
'--output-directory', '<(shim_headers_path)',
'<@(header_filenames)',
],
},
'action_name': 'generate_<(_target_name)_shim_headers',
'inputs': [
'<(generator_path)',
],
'outputs': [
'<!@pymod_do_main(generate_shim_headers <@(generator_args) --outputs)',
],
'action': ['python',
'<(generator_path)',
'<@(generator_args)',
'--generate',
],
'message': 'Generating <(_target_name) shim headers.',
},
],
}