diff options
author | rockot <rockot@chromium.org> | 2015-05-18 13:18:00 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-18 20:17:59 +0000 |
commit | 7b6128acec63c2ca021e314aeed1f77c5896f4c0 (patch) | |
tree | 01fd5851deb6479f44b6d0c733b205b0f678aa60 | |
parent | 76ebffc02eb4275a837ae8122bed5628ed44f513 (diff) | |
download | chromium_src-7b6128acec63c2ca021e314aeed1f77c5896f4c0.zip chromium_src-7b6128acec63c2ca021e314aeed1f77c5896f4c0.tar.gz chromium_src-7b6128acec63c2ca021e314aeed1f77c5896f4c0.tar.bz2 |
Add gypi_to_gn for content/utility sources list
BUG=None
Review URL: https://codereview.chromium.org/1138003007
Cr-Commit-Position: refs/heads/master@{#330393}
-rw-r--r-- | .gn | 1 | ||||
-rw-r--r-- | content/content_utility.gypi | 38 | ||||
-rw-r--r-- | content/utility/BUILD.gn | 15 | ||||
-rw-r--r-- | content/utility/utility.gni | 16 |
4 files changed, 44 insertions, 26 deletions
@@ -128,6 +128,7 @@ exec_script_whitelist = [ "//content/public/android/BUILD.gn", "//content/renderer/renderer.gni", "//content/test/BUILD.gn", + "//content/utility/utility.gni", "//extensions/common/api/schemas.gni", "//extensions/extensions.gni", "//extensions/shell/app_shell.gni", diff --git a/content/content_utility.gypi b/content/content_utility.gypi index b202787..bbdfd4f 100644 --- a/content/content_utility.gypi +++ b/content/content_utility.gypi @@ -7,22 +7,30 @@ '../base/base.gyp:base', '../courgette/courgette.gyp:courgette_lib', ], - 'sources': [ - 'public/utility/content_utility_client.cc', - 'public/utility/content_utility_client.h', - 'public/utility/utility_thread.cc', - 'public/utility/utility_thread.h', - 'utility/in_process_utility_thread.cc', - 'utility/in_process_utility_thread.h', - 'utility/utility_blink_platform_impl.cc', - 'utility/utility_blink_platform_impl.h', - 'utility/utility_main.cc', - 'utility/utility_thread_impl.cc', - 'utility/utility_thread_impl.h', - 'utility/webthread_impl_for_utility_thread.cc', - 'utility/webthread_impl_for_utility_thread.h', - ], + 'variables': { + 'utility_sources': [ + 'utility/in_process_utility_thread.cc', + 'utility/in_process_utility_thread.h', + 'utility/utility_blink_platform_impl.cc', + 'utility/utility_blink_platform_impl.h', + 'utility/utility_main.cc', + 'utility/utility_thread_impl.cc', + 'utility/utility_thread_impl.h', + 'utility/webthread_impl_for_utility_thread.cc', + 'utility/webthread_impl_for_utility_thread.h', + ], + 'public_utility_sources': [ + 'public/utility/content_utility_client.cc', + 'public/utility/content_utility_client.h', + 'public/utility/utility_thread.cc', + 'public/utility/utility_thread.h', + ], + }, 'include_dirs': [ '..', ], + 'sources': [ + '<@(public_utility_sources)', + '<@(utility_sources)', + ], } diff --git a/content/utility/BUILD.gn b/content/utility/BUILD.gn index 7a8f4ac..5767b98 100644 --- a/content/utility/BUILD.gn +++ b/content/utility/BUILD.gn @@ -2,22 +2,15 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//content/utility/utility.gni") + source_set("utility") { # Only the public target should depend on this. All other targets (even # internal content ones) should depend on the public one. visibility = [ "//content/public/utility:utility_sources" ] - sources = [ - "in_process_utility_thread.cc", - "in_process_utility_thread.h", - "utility_blink_platform_impl.cc", - "utility_blink_platform_impl.h", - "utility_main.cc", - "utility_thread_impl.cc", - "utility_thread_impl.h", - "webthread_impl_for_utility_thread.cc", - "webthread_impl_for_utility_thread.h", - ] + sources = + rebase_path(content_utility_gypi_values.utility_sources, ".", "//content") configs += [ "//content:content_implementation" ] diff --git a/content/utility/utility.gni b/content/utility/utility.gni new file mode 100644 index 0000000..ee08149 --- /dev/null +++ b/content/utility/utility.gni @@ -0,0 +1,16 @@ +# Copyright 2015 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 defines the content utility gypi values. This file is read once and +# cached, which is a performance optimization that allows us to share the +# results of parsing the .gypi file between the public and private BUILD.gn +# files. It also saves us from duplicating this exec_script call. +content_utility_gypi_values = + exec_script("//build/gypi_to_gn.py", + [ + rebase_path("../content_utility.gypi"), + "--replace=<(SHARED_INTERMEDIATE_DIR)=$root_gen_dir", + ], + "scope", + [ "../content_utility.gypi" ]) |