Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(959)

Side by Side Diff: mojo/public/mojo_application_manifest.gni

Issue 1850623004: Create .mojo applications in a common subdir under out/Debug (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « mojo/public/mojo_application.gni ('k') | mojo/public/mojo_constants.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//mojo/public/mojo_constants.gni")
6
5 # Used to produce a Mojo Application Manifest for an application. 7 # Used to produce a Mojo Application Manifest for an application.
6 # 8 #
7 # Parameters: 9 # Parameters:
8 # 10 #
9 # source 11 # source
10 # The manifest file template for this application, must be valid JSON with 12 # The manifest file template for this application, must be valid JSON with
11 # a valid 'url' key matching application_name. 13 # a valid 'url' key matching application_name.
12 # 14 #
13 # application_name 15 # application_name
14 # The host portion of the mojo: URL of the application. The script 16 # The host portion of the mojo: URL of the application. The script
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 if (defined(invoker.type)) { 62 if (defined(invoker.type)) {
61 type = invoker.type 63 type = invoker.type
62 } 64 }
63 65
64 application_name = invoker.application_name 66 application_name = invoker.application_name
65 inputs = [ 67 inputs = [
66 invoker.source, 68 invoker.source,
67 ] 69 ]
68 70
69 if (type == "mojo") { 71 if (type == "mojo") {
70 output = "$root_out_dir/$application_name/manifest.json" 72 output = "$root_out_dir/$mojo_application_subdir/$application_name/manifes t.json"
71 } else { 73 } else {
72 output = "$root_out_dir/${application_name}_manifest.json" 74 output = "$root_out_dir/${application_name}_manifest.json"
73 } 75 }
74 outputs = [ 76 outputs = [
75 output, 77 output,
76 ] 78 ]
77 79
78 rebase_parent = rebase_path(invoker.source, root_build_dir) 80 rebase_parent = rebase_path(invoker.source, root_build_dir)
79 rebase_output = rebase_path(output, root_build_dir) 81 rebase_output = rebase_path(output, root_build_dir)
80 82
81 args = [ 83 args = [
82 "--application-name=$application_name", 84 "--application-name=$application_name",
83 "--parent=$rebase_parent", 85 "--parent=$rebase_parent",
84 "--output=$rebase_output", 86 "--output=$rebase_output",
85 ] 87 ]
86 88
87 if (defined(invoker.packaged_applications)) { 89 if (defined(invoker.packaged_applications)) {
88 foreach(application_name, invoker.packaged_applications) { 90 foreach(application_name, invoker.packaged_applications) {
89 input = "$root_out_dir/$application_name/manifest.json" 91 input = "$root_out_dir/$mojo_application_subdir/$application_name/manife st.json"
90 inputs += [ input ] 92 inputs += [ input ]
91 args += [ rebase_path(input, root_build_dir) ] 93 args += [ rebase_path(input, root_build_dir) ]
92 } 94 }
93 } 95 }
94 deps = [] 96 deps = []
95 if (defined(invoker.deps)) { 97 if (defined(invoker.deps)) {
96 deps += invoker.deps 98 deps += invoker.deps
97 } 99 }
98 } 100 }
99 101
100 all_deps = [] 102 all_deps = []
101 if (defined(invoker.deps)) { 103 if (defined(invoker.deps)) {
102 all_deps += invoker.deps 104 all_deps += invoker.deps
103 } 105 }
104 106
105 group("${target_name}__is_mojo_application_manifest") { 107 group("${target_name}__is_mojo_application_manifest") {
106 } 108 }
107 109
108 # Explicitly ensure that all dependencies are mojo_application_manifest 110 # Explicitly ensure that all dependencies are mojo_application_manifest
109 # targets themselves. 111 # targets themselves.
110 group("${target_name}__check_deps_are_all_mojo_application_manifest") { 112 group("${target_name}__check_deps_are_all_mojo_application_manifest") {
111 deps = [] 113 deps = []
112 foreach(d, all_deps) { 114 foreach(d, all_deps) {
113 name = get_label_info(d, "label_no_toolchain") 115 name = get_label_info(d, "label_no_toolchain")
114 toolchain = get_label_info(d, "toolchain") 116 toolchain = get_label_info(d, "toolchain")
115 deps += [ "${name}__is_mojo_application_manifest(${toolchain})" ] 117 deps += [ "${name}__is_mojo_application_manifest(${toolchain})" ]
116 } 118 }
117 } 119 }
118 } 120 }
OLDNEW
« no previous file with comments | « mojo/public/mojo_application.gni ('k') | mojo/public/mojo_constants.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698