Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2015 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 import("//build/config/ui.gni") | |
| 6 | |
| 7 component("fieldtrial_testing_config") { | |
|
brettw
2015/07/10 19:49:04
Delete this, actions are separate targets in GN. I
| |
| 8 action("fieldtrial_testing_config_action") { | |
| 9 visibility = [ ":fieldtrial_testing_config" ] | |
| 10 script = "//tools/variations/fieldtrial_to_struct.py" | |
| 11 | |
| 12 if (is_win) { | |
| 13 source = "//testing/variations/fieldtrial_testing_config_win.json" | |
| 14 } | |
| 15 if (is_mac) { | |
| 16 source = "//testing/variations/fieldtrial_testing_config_mac.json" | |
| 17 } | |
| 18 if (is_linux) { | |
| 19 source = "//testing/variations/fieldtrial_testing_config_linux.json" | |
| 20 } | |
| 21 if (is_chromeos) { | |
| 22 source = "//testing/variations/fieldtrial_testing_config_chromeos.json" | |
| 23 } | |
| 24 if (is_android) { | |
| 25 source = "//testing/variations/fieldtrial_testing_config_android.json" | |
| 26 } | |
| 27 if (is_ios) { | |
| 28 source = "//testing/variations/fieldtrial_testing_config_ios.json" | |
| 29 } | |
| 30 | |
| 31 inputs = [ | |
| 32 "//tools/json_to_struct/element_generator.py", | |
| 33 "//tools/json_to_struct/json_to_struct.py", | |
| 34 "//tools/json_to_struct/struct_generator.py", | |
| 35 source, | |
| 36 ] | |
| 37 out_dir = get_path_info("variations", "gen_dir") | |
|
brettw
2015/07/10 19:49:04
This get_path_info will return "//out/foo/gen/chro
danduong
2015/07/10 22:41:37
Done.
| |
| 38 out_name = "fieldtrial_testing_config" | |
| 39 outputs = [ | |
| 40 "$out_dir/$out_name.cc", | |
| 41 "$out_dir/$out_name.h", | |
| 42 ] | |
| 43 | |
| 44 args = [ | |
| 45 rebase_path(source, root_build_dir), | |
| 46 "--destbase=" + rebase_path(out_dir, root_build_dir), | |
| 47 "--namespace=chrome_variations", | |
| 48 "--schema=" + | |
| 49 rebase_path("fieldtrial_testing_config_schema.json", root_build_dir), | |
| 50 "--output=$out_name", | |
| 51 ] | |
| 52 } | |
| 53 | |
| 54 visibility = [ "*" ] | |
|
brettw
2015/07/10 19:49:04
Delete this.
danduong
2015/07/10 22:41:36
Done.
| |
| 55 sources = get_target_outputs(":fieldtrial_testing_config_action") | |
|
brettw
2015/07/10 19:49:04
Before here, start a new target:
source_set("fie
danduong
2015/07/10 22:41:36
Done.
| |
| 56 deps = [ | |
| 57 ":fieldtrial_testing_config_action", | |
| 58 ] | |
| 59 } | |
| OLD | NEW |