From 048d44a1a763ed3e6932c8bff5b45ccce2b70692 Mon Sep 17 00:00:00 2001 From: "phajdan.jr@chromium.org" Date: Tue, 18 Dec 2012 01:51:37 +0000 Subject: [PATCH] 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 --- gyp_chromium | 1 + shim_headers.gypi | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 shim_headers.gypi diff --git a/gyp_chromium b/gyp_chromium index 499fa5cde..ee5b3f3da 100755 --- a/gyp_chromium +++ b/gyp_chromium @@ -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')) diff --git a/shim_headers.gypi b/shim_headers.gypi new file mode 100644 index 000000000..cf0914d9f --- /dev/null +++ b/shim_headers.gypi @@ -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': [ + '