diff options
author | garykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-09 20:57:49 +0000 |
---|---|---|
committer | garykac@chromium.org <garykac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-09 20:57:49 +0000 |
commit | 99245a080cb0558a1642b4416f9e44f24bba3b3c (patch) | |
tree | bd5833a0c799281bb4b2728957ab1bfa4e922be0 | |
parent | 8a21822aef69e2f420053a30c35835ba6d794b03 (diff) | |
download | chromium_src-99245a080cb0558a1642b4416f9e44f24bba3b3c.zip chromium_src-99245a080cb0558a1642b4416f9e44f24bba3b3c.tar.gz chromium_src-99245a080cb0558a1642b4416f9e44f24bba3b3c.tar.bz2 |
Move common_constants target into a proper .gyp file so that it can shared
more easily by multiple projects (e.g., chrome & unittests).
This is needed because:
* Including the gypi directly from each .gyp that needs it will break ninja
(since it merges all the gyps into a single file).
* Referring to chrome.gyp:common_constants breaks the circular dependency
check on the Mac.
BUG=none
TEST=gclient runhooks, make chrome, ninja chrome
Review URL: https://chromiumcodereview.appspot.com/9112019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160922 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/chrome.gyp | 17 | ||||
-rw-r--r-- | chrome/chrome_common.gypi | 2 | ||||
-rw-r--r-- | chrome/chrome_exe.gypi | 2 | ||||
-rw-r--r-- | chrome/chrome_installer.gypi | 2 | ||||
-rw-r--r-- | chrome/chrome_installer_util.gypi | 4 | ||||
-rw-r--r-- | chrome/chrome_tests.gypi | 2 | ||||
-rw-r--r-- | chrome/common_constants.gyp | 93 | ||||
-rw-r--r-- | chrome/common_constants.gypi | 98 | ||||
-rw-r--r-- | chrome/installer/installer_tools.gyp | 2 | ||||
-rw-r--r-- | chrome/installer/upgrade_test.gyp | 6 | ||||
-rw-r--r-- | chrome/version.gypi | 18 |
11 files changed, 124 insertions, 122 deletions
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index b25c318..4dce369 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -5,17 +5,6 @@ 'variables': { 'chromium_code': 1, - 'variables': { - 'version_py_path': 'tools/build/version.py', - 'version_path': 'VERSION', - }, - 'version_py_path': '<(version_py_path)', - 'version_path': '<(version_path)', - 'version_full': - '<!(python <(version_py_path) -f <(version_path) -t "@MAJOR@.@MINOR@.@BUILD@.@PATCH@")', - 'version_mac_dylib': - '<!(python <(version_py_path) -f <(version_path) -t "@BUILD@.@PATCH_HI@.@PATCH_LO@" -e "PATCH_HI=int(PATCH)/256" -e "PATCH_LO=int(PATCH)%256")', - # Define the common dependencies that contain all the actual # Chromium functionality. This list gets pulled in below by # the link of the actual chrome (or chromium) executable on @@ -146,8 +135,8 @@ 'chrome_installer_util.gypi', 'chrome_renderer.gypi', 'chrome_tests.gypi', - 'common_constants.gypi', 'nacl.gypi', + 'version.gypi', ], 'targets': [ { @@ -1005,11 +994,11 @@ 'type': 'executable', 'dependencies': [ 'app/policy/cloud_policy_codegen.gyp:policy', - 'common_constants', 'installer_util', '../base/base.gyp:base', '../breakpad/breakpad.gyp:breakpad_handler', '../breakpad/breakpad.gyp:breakpad_sender', + '../chrome/common_constants.gyp:common_constants', ], 'include_dirs': [ '..', @@ -1030,11 +1019,11 @@ 'type': 'executable', 'product_name': 'crash_service64', 'dependencies': [ - 'common_constants_win64', 'installer_util_nacl_win64', '../base/base.gyp:base_static_win64', '../breakpad/breakpad.gyp:breakpad_handler_win64', '../breakpad/breakpad.gyp:breakpad_sender_win64', + '../chrome/common_constants.gyp:common_constants_win64', ], 'include_dirs': [ '..', diff --git a/chrome/chrome_common.gypi b/chrome/chrome_common.gypi index 800afc3..7b26b21 100644 --- a/chrome/chrome_common.gypi +++ b/chrome/chrome_common.gypi @@ -26,7 +26,6 @@ # TODO(gregoryd): chrome_resources and chrome_strings could be # shared with the 64-bit target, but it does not work due to a gyp # issue. - 'common_constants', 'common_net', 'common_version', 'metrics_proto', @@ -39,6 +38,7 @@ '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings', '<(DEPTH)/chrome/chrome_resources.gyp:theme_resources', '<(DEPTH)/chrome/common/extensions/api/api.gyp:api', + '<(DEPTH)/chrome/common_constants.gyp:common_constants', '<(DEPTH)/content/content.gyp:content_common', '<(DEPTH)/ipc/ipc.gyp:ipc', '<(DEPTH)/net/net.gyp:net', diff --git a/chrome/chrome_exe.gypi b/chrome/chrome_exe.gypi index c8527f9..7ecc789 100644 --- a/chrome/chrome_exe.gypi +++ b/chrome/chrome_exe.gypi @@ -557,7 +557,6 @@ 'dependencies': [ 'app/policy/cloud_policy_codegen.gyp:policy_win64', 'chrome_version_resources', - 'common_constants_win64', 'installer_util_nacl_win64', 'nacl_win64', '../breakpad/breakpad.gyp:breakpad_handler_win64', @@ -566,6 +565,7 @@ '../base/base.gyp:base_nacl_win64', '../base/base.gyp:base_static_win64', '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64', + '../chrome/common_constants.gyp:common_constants_win64', '../crypto/crypto.gyp:crypto_nacl_win64', '../ipc/ipc.gyp:ipc_win64', '../sandbox/sandbox.gyp:sandbox_win64', diff --git a/chrome/chrome_installer.gypi b/chrome/chrome_installer.gypi index c73c5d9..97cf4c4 100644 --- a/chrome/chrome_installer.gypi +++ b/chrome/chrome_installer.gypi @@ -262,7 +262,7 @@ 'installer_util_strings', '../base/base.gyp:base', '../build/temp_gyp/googleurl.gyp:googleurl', - '../chrome/chrome.gyp:common_constants', + '../chrome/common_constants.gyp:common_constants', '../chrome_frame/chrome_frame.gyp:chrome_tab_idl', '../chrome_frame/chrome_frame.gyp:npchrome_frame', '../breakpad/breakpad.gyp:breakpad_handler', diff --git a/chrome/chrome_installer_util.gypi b/chrome/chrome_installer_util.gypi index 45ffd9e..3486131 100644 --- a/chrome/chrome_installer_util.gypi +++ b/chrome/chrome_installer_util.gypi @@ -105,12 +105,12 @@ }, 'dependencies': [ 'installer_util_strings', - 'common_constants', '<(DEPTH)/base/base.gyp:base', '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl', '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources', '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings', + '<(DEPTH)/chrome/common_constants.gyp:common_constants', '<(DEPTH)/content/content.gyp:content_common', '<(DEPTH)/courgette/courgette.gyp:courgette_lib', '<(DEPTH)/crypto/crypto.gyp:crypto', @@ -194,9 +194,9 @@ 'target_name': 'installer_util', 'type': 'static_library', 'dependencies': [ - 'common_constants', '<(DEPTH)/chrome/chrome_resources.gyp:chrome_resources', '<(DEPTH)/chrome/chrome_resources.gyp:chrome_strings', + '<(DEPTH)/chrome/common_constants.gyp:common_constants', ], 'sources': [ 'installer/util/master_preferences.cc', diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index d7a50d8f..5899e3b 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -4261,9 +4261,9 @@ 'product_name': 'app_mode_app_tests', 'dependencies': [ '../base/base.gyp:test_support_base', + '../chrome/common_constants.gyp:common_constants', '../testing/gtest.gyp:gtest', 'chrome.gyp:chrome', # run time dependency - 'common_constants', 'app_mode_app_support', ], 'sources': [ diff --git a/chrome/common_constants.gyp b/chrome/common_constants.gyp new file mode 100644 index 0000000..8952dae --- /dev/null +++ b/chrome/common_constants.gyp @@ -0,0 +1,93 @@ +# 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. + +{ + 'variables': { + 'chromium_code': 1, + }, + + 'includes': [ + 'version.gypi', + ], + + 'target_defaults': { + 'sources': [ + 'common/chrome_constants.cc', + 'common/chrome_constants.h', + 'common/chrome_paths.cc', + 'common/chrome_paths.h', + 'common/chrome_paths_android.cc', + 'common/chrome_paths_internal.h', + 'common/chrome_paths_linux.cc', + 'common/chrome_paths_mac.mm', + 'common/chrome_paths_win.cc', + 'common/chrome_switches.cc', + 'common/chrome_switches.h', + 'common/env_vars.cc', + 'common/env_vars.h', + 'common/net/test_server_locations.cc', + 'common/net/test_server_locations.h', + 'common/pref_names.cc', + 'common/pref_names.h', + ], + 'actions': [ + { + 'action_name': 'Make chrome_version.cc', + 'variables': { + 'make_version_cc_path': 'tools/build/make_version_cc.py', + }, + 'inputs': [ + '<(make_version_cc_path)', + 'VERSION', + ], + 'outputs': [ + '<(INTERMEDIATE_DIR)/chrome_version.cc', + ], + 'action': [ + 'python', + '<(make_version_cc_path)', + '<@(_outputs)', + '<(version_full)', + ], + 'process_outputs_as_sources': 1, + }, + ], + }, + 'targets': [ + { + 'target_name': 'common_constants', + 'type': 'static_library', + 'dependencies': [ + '../base/base.gyp:base', + ], + 'conditions': [ + ['toolkit_uses_gtk == 1', { + 'dependencies': ['../build/linux/system.gyp:gtk'], + }], + ], + }, + ], + 'conditions': [ + ['OS=="win"', { + 'targets': [ + { + 'target_name': 'common_constants_win64', + 'type': 'static_library', + 'dependencies': [ + '../base/base.gyp:base_nacl_win64', + ], + 'defines': [ + '<@(nacl_win64_defines)', + 'COMPILE_CONTENT_STATICALLY', + ], + 'configurations': { + 'Common_Base': { + 'msvs_target_platform': 'x64', + }, + }, + }, + ], + }], + ], +} diff --git a/chrome/common_constants.gypi b/chrome/common_constants.gypi deleted file mode 100644 index a2a93e0..0000000 --- a/chrome/common_constants.gypi +++ /dev/null @@ -1,98 +0,0 @@ -# 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. - -{ - 'target_defaults': { - 'variables': { - 'common_constants_target': 0, - }, - 'target_conditions': [ - ['common_constants_target==1', { - 'sources': [ - 'common/chrome_constants.cc', - 'common/chrome_constants.h', - 'common/chrome_paths.cc', - 'common/chrome_paths.h', - 'common/chrome_paths_android.cc', - 'common/chrome_paths_internal.h', - 'common/chrome_paths_linux.cc', - 'common/chrome_paths_mac.mm', - 'common/chrome_paths_win.cc', - 'common/chrome_switches.cc', - 'common/chrome_switches.h', - 'common/env_vars.cc', - 'common/env_vars.h', - 'common/net/test_server_locations.cc', - 'common/net/test_server_locations.h', - 'common/pref_names.cc', - 'common/pref_names.h', - ], - 'actions': [ - { - 'action_name': 'Make chrome_version.cc', - 'variables': { - 'make_version_cc_path': 'tools/build/make_version_cc.py', - }, - 'inputs': [ - '<(make_version_cc_path)', - 'VERSION', - ], - 'outputs': [ - '<(INTERMEDIATE_DIR)/chrome_version.cc', - ], - 'action': [ - 'python', - '<(make_version_cc_path)', - '<@(_outputs)', - '<(version_full)', - ], - 'process_outputs_as_sources': 1, - }, - ], - }], - ], - }, - 'targets': [ - { - 'target_name': 'common_constants', - 'type': 'static_library', - 'variables': { - 'common_constants_target': 1, - }, - 'dependencies': [ - '../base/base.gyp:base', - ], - 'conditions': [ - ['toolkit_uses_gtk == 1', { - 'dependencies': ['../build/linux/system.gyp:gtk'], - }], - ], - }, - ], - 'conditions': [ - ['OS=="win"', { - 'targets': [ - { - 'target_name': 'common_constants_win64', - 'type': 'static_library', - 'variables': { - 'common_constants_target': 1, - }, - 'dependencies': [ - '../base/base.gyp:base_nacl_win64', - ], - 'defines': [ - '<@(nacl_win64_defines)', - 'COMPILE_CONTENT_STATICALLY', - ], - 'configurations': { - 'Common_Base': { - 'msvs_target_platform': 'x64', - }, - }, - }, - ], - }], - ], -} diff --git a/chrome/installer/installer_tools.gyp b/chrome/installer/installer_tools.gyp index 644137c..7af6c48 100644 --- a/chrome/installer/installer_tools.gyp +++ b/chrome/installer/installer_tools.gyp @@ -19,9 +19,9 @@ 'type': 'executable', 'dependencies': [ '<(DEPTH)/base/base.gyp:base', - '<(DEPTH)/chrome/chrome.gyp:common_constants', '<(DEPTH)/chrome/chrome.gyp:installer_util', '<(DEPTH)/chrome/chrome.gyp:installer_util_strings', + '<(DEPTH)/chrome/common_constants.gyp:common_constants', ], 'include_dirs': [ '<(DEPTH)', diff --git a/chrome/installer/upgrade_test.gyp b/chrome/installer/upgrade_test.gyp index 4d703509..ee23ce4 100644 --- a/chrome/installer/upgrade_test.gyp +++ b/chrome/installer/upgrade_test.gyp @@ -21,8 +21,8 @@ 'target_name': 'alternate_version_generator_lib', 'type': 'static_library', 'dependencies': [ - '../chrome.gyp:common_constants', '../chrome.gyp:installer_util', + '../common_constants.gyp:common_constants', '../../base/base.gyp:base', ], 'include_dirs': [ @@ -53,8 +53,8 @@ # 'mini_installer.gyp:mini_installer', '../../base/base.gyp:test_support_base', '../../testing/gtest.gyp:gtest', - '../chrome.gyp:common_constants', '../chrome.gyp:installer_util', + '../common_constants.gyp:common_constants', ], 'include_dirs': [ '../..', @@ -71,8 +71,8 @@ 'alternate_version_generator_lib', '../../base/base.gyp:test_support_base', '../../testing/gtest.gyp:gtest', - '../chrome.gyp:common_constants', '../chrome.gyp:installer_util', + '../common_constants.gyp:common_constants', ], 'include_dirs': [ '../..', diff --git a/chrome/version.gypi b/chrome/version.gypi new file mode 100644 index 0000000..7b13385 --- /dev/null +++ b/chrome/version.gypi @@ -0,0 +1,18 @@ +# 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. + +{ + 'variables': { + 'variables': { + 'version_py_path': 'tools/build/version.py', + 'version_path': 'VERSION', + }, + 'version_py_path': '<(version_py_path)', + 'version_path': '<(version_path)', + 'version_full': + '<!(python <(version_py_path) -f <(version_path) -t "@MAJOR@.@MINOR@.@BUILD@.@PATCH@")', + 'version_mac_dylib': + '<!(python <(version_py_path) -f <(version_path) -t "@BUILD@.@PATCH_HI@.@PATCH_LO@" -e "PATCH_HI=int(PATCH)/256" -e "PATCH_LO=int(PATCH)%256")', + }, # variables +} |