Index: chrome/common/variations/BUILD.gn |
diff --git a/chrome/common/variations/BUILD.gn b/chrome/common/variations/BUILD.gn |
new file mode 100644 |
index 0000000000000000000000000000000000000000..7ed24de70442b5315608299aad681f599a54c9c1 |
--- /dev/null |
+++ b/chrome/common/variations/BUILD.gn |
@@ -0,0 +1,59 @@ |
+# 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. |
+ |
+import("//build/config/ui.gni") |
+ |
+component("fieldtrial_testing_config") { |
brettw
2015/07/10 19:49:04
Delete this, actions are separate targets in GN. I
|
+ action("fieldtrial_testing_config_action") { |
+ visibility = [ ":fieldtrial_testing_config" ] |
+ script = "//tools/variations/fieldtrial_to_struct.py" |
+ |
+ if (is_win) { |
+ source = "//testing/variations/fieldtrial_testing_config_win.json" |
+ } |
+ if (is_mac) { |
+ source = "//testing/variations/fieldtrial_testing_config_mac.json" |
+ } |
+ if (is_linux) { |
+ source = "//testing/variations/fieldtrial_testing_config_linux.json" |
+ } |
+ if (is_chromeos) { |
+ source = "//testing/variations/fieldtrial_testing_config_chromeos.json" |
+ } |
+ if (is_android) { |
+ source = "//testing/variations/fieldtrial_testing_config_android.json" |
+ } |
+ if (is_ios) { |
+ source = "//testing/variations/fieldtrial_testing_config_ios.json" |
+ } |
+ |
+ inputs = [ |
+ "//tools/json_to_struct/element_generator.py", |
+ "//tools/json_to_struct/json_to_struct.py", |
+ "//tools/json_to_struct/struct_generator.py", |
+ source, |
+ ] |
+ 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.
|
+ out_name = "fieldtrial_testing_config" |
+ outputs = [ |
+ "$out_dir/$out_name.cc", |
+ "$out_dir/$out_name.h", |
+ ] |
+ |
+ args = [ |
+ rebase_path(source, root_build_dir), |
+ "--destbase=" + rebase_path(out_dir, root_build_dir), |
+ "--namespace=chrome_variations", |
+ "--schema=" + |
+ rebase_path("fieldtrial_testing_config_schema.json", root_build_dir), |
+ "--output=$out_name", |
+ ] |
+ } |
+ |
+ visibility = [ "*" ] |
brettw
2015/07/10 19:49:04
Delete this.
danduong
2015/07/10 22:41:36
Done.
|
+ 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.
|
+ deps = [ |
+ ":fieldtrial_testing_config_action", |
+ ] |
+} |