Index: remoting/webapp/build_template.gni |
diff --git a/remoting/webapp/build_template.gni b/remoting/webapp/build_template.gni |
index c47eae7314878a99f82b37a4c2d7387bd2c45f4a..9e8ab1804540bcfef23914a261eec9d28f885f96 100644 |
--- a/remoting/webapp/build_template.gni |
+++ b/remoting/webapp/build_template.gni |
@@ -47,25 +47,30 @@ template("build_locales_listfile") { |
} |
template("build_webapp_html") { |
- target_jscompile = "${target_name}_jscompile" |
- target_jscompile_stamp = "$target_gen_dir/${target_jscompile}.stamp" |
- action(target_jscompile) { |
- js_files = remoting_webapp_js_proto_files + invoker.js_files |
- |
- script = "../../third_party/closure_compiler/compile.py" |
- inputs = js_files |
- outputs = [ |
- target_jscompile_stamp, |
- ] |
+ target_jscompile = "" |
+ |
+ if (run_jscompile) { |
+ target_jscompile = "${target_name}_jscompile" |
+ target_jscompile_stamp = "$target_gen_dir/${target_jscompile}.stamp" |
+ action(target_jscompile) { |
+ js_files = remoting_webapp_js_proto_files + invoker.js_files |
+ |
+ script = "../../third_party/closure_compiler/compile.py" |
+ inputs = js_files |
+ outputs = [ |
+ target_jscompile_stamp, |
+ ] |
- args = [ |
- "--strict", |
- "--no-single-file", |
- "--externs", |
- "../../third_party/closure_compiler/externs/chrome_extensions.js", |
- "--success-stamp", |
- rebase_path(target_jscompile_stamp, root_build_dir), |
- ] + rebase_path(js_files, root_build_dir) |
+ args = [ |
+ "--strict", |
+ "--no-single-file", |
+ "--externs", |
+ "../../third_party/closure_compiler/externs/chrome_extensions.js", |
+ "--success-stamp", |
+ rebase_path(target_jscompile_stamp, root_build_dir), |
+ ] |
+ args += rebase_path(js_files, root_build_dir) |
+ } |
} |
action(target_name) { |
@@ -82,7 +87,7 @@ template("build_webapp_html") { |
html_output, |
] |
- if (run_jscompile) { |
+ if (target_jscompile != "") { |
garykac
2015/06/05 21:09:35
I actually don't like this because it now takes mo
Dan Beam
2015/06/05 21:14:51
I think it reads OK: if there's something to compi
|
deps = [ |
":$target_jscompile", |
] |