diff options
author | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-15 23:57:53 +0000 |
---|---|---|
committer | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-15 23:57:53 +0000 |
commit | afe6ec193c0e36390a366651dd5433fc5123b082 (patch) | |
tree | 24123317829efaa68d4d6caf0bdfe6bbeb15d6de /base | |
parent | ce2b6247443a23949db646f0e5db6041af44e71e (diff) | |
download | chromium_src-afe6ec193c0e36390a366651dd5433fc5123b082.zip chromium_src-afe6ec193c0e36390a366651dd5433fc5123b082.tar.gz chromium_src-afe6ec193c0e36390a366651dd5433fc5123b082.tar.bz2 |
Rewrite version.sh as version.py to work better with gyp and be more
generic (no hard-coded list of substitution variables, only use file
names specified from the command line). Update base.gyp with the to
generate file_version_info_linux.h with the new calling convention.
Review URL: http://codereview.chromium.org/113432
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16211 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/base.gyp | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/base/base.gyp b/base/base.gyp index 3355042..0662377 100644 --- a/base/base.gyp +++ b/base/base.gyp @@ -344,22 +344,30 @@ { 'action_name': 'linux_version', 'variables': { + 'version_py_path': '../chrome/tools/build/version.py', + 'version_path': '../chrome/VERSION', 'template_input_path': 'file_version_info_linux.h.version', 'template_output_path': '<(SHARED_INTERMEDIATE_DIR)/base/file_version_info_linux.h', }, - 'inputs': [ - '<(template_input_path)', - '../chrome/VERSION', - '../chrome/tools/build/linux/version.sh', - ], 'conditions': [ [ 'branding == "Chrome"', { - 'inputs': ['../chrome/app/theme/google_chrome/BRANDING'] - }, { # else branding!="Chrome" - 'inputs': ['../chrome/app/theme/chromium/BRANDING'] + 'variables': { + 'branding_path': + '../chrome/app/theme/google_chrome/BRANDING', + }, + }, { # else branding!="Chrome" + 'variables': { + 'branding_path': + '../chrome/app/theme/chromium/BRANDING', + }, }], ], + 'inputs': [ + '<(template_input_path)', + '<(version_path)', + '<(branding_path)', + ], 'outputs': [ # Use a non-existant output so this action always runs and # generates version information, e.g. to capture revision @@ -371,9 +379,14 @@ '<(SHARED_INTERMEDIATE_DIR)/base/file_version_info_linux.h', ], 'action': [ - '../chrome/tools/build/linux/version.sh', - '<(template_input_path)', '<(template_output_path)', + 'python', + '<(version_py_path)', + '-f', '<(version_path)', + '-f', '<(branding_path)', + '<(template_input_path)', + '<(template_output_path)', ], + 'message': 'Generating version information', }, ], 'include_dirs': [ |