Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 1 | # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | action("webkit_version") { |
| 6 | script = "version.py" |
| 7 | |
| 8 | lastchange_file = "LASTCHANGE.blink" |
| 9 | |
| 10 | template_file = "webkit_version.h.in" |
| 11 | inputs = [ |
| 12 | lastchange_file, |
| 13 | template_file, |
| 14 | ] |
| 15 | |
| 16 | output_file = "$target_gen_dir/webkit_version.h" |
| 17 | outputs = [ |
| 18 | output_file, |
| 19 | ] |
| 20 | |
| 21 | args = [ |
| 22 | "-f", |
| 23 | rebase_path(lastchange_file, root_build_dir), |
| 24 | rebase_path(template_file, root_build_dir), |
| 25 | rebase_path(output_file, root_build_dir), |
| 26 | ] |
| 27 | } |
| 28 | |
| 29 | action("chrome_version_json") { |
| 30 | script = "version.py" |
| 31 | _chrome_version_path = "//chrome/VERSION" |
| 32 | inputs = [ |
| 33 | _chrome_version_path, |
| 34 | ] |
| 35 | _output_file = "$root_gen_dir/CHROME_VERSION.json" |
| 36 | outputs = [ |
| 37 | _output_file, |
| 38 | ] |
| 39 | args = [ |
| 40 | "--file", |
| 41 | rebase_path(_chrome_version_path, root_build_dir), |
| 42 | "--template", |
| 43 | "{\"full-quoted\": \"\\\"@MAJOR@.@MINOR@.@BUILD@.@PATCH@\\\"\"}", |
| 44 | "--output", |
| 45 | rebase_path(_output_file, root_build_dir), |
| 46 | ] |
| 47 | } |