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

Unified Diff: build/gn_helper_scripts.gni

Issue 266613002: Add BUILD.gn for third_party/yasm. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix path issues and some option propagation. Created 6 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 side-by-side diff with in-line comments
Download patch
Index: build/gn_helper_scripts.gni
diff --git a/build/gn_helper_scripts.gni b/build/gn_helper_scripts.gni
new file mode 100644
index 0000000000000000000000000000000000000000..3c50528abdd94d83748c0141b7884f3deef4e0b0
--- /dev/null
+++ b/build/gn_helper_scripts.gni
@@ -0,0 +1,54 @@
+# Copyright 2014 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.
+
+template("run_executable") {
+ action("${target_name}") {
+ script = "//build/gn_run_binary.py"
+
+ if (defined(invoker.sources)) { sources = invoker.sources }
+ if (defined(invoker.outputs)) { outputs = invoker.outputs }
+ if (defined(invoker.source_prereqs)) {
+ source_prereqs = invoker.source_prereqs
+ }
+
+ args = [
+ rebase_path(root_out_dir + "/" + invoker.binary_name, root_build_dir)
+ ]
+ if (defined(invoker.args)) {
+ args += invoker.args
+ }
+
+ datadeps = [ "//build:gn_helper_scripts" ]
+ if (defined(invoker.datadeps)) {
+ datadeps += invoker.datadeps
+ }
+ if (defined(invoker.deps)) { deps = invoker.deps }
brettw 2014/05/05 16:46:50 Can you expand this onto multiple lines? Same abov
awong 2014/05/05 19:28:34 Done.
+ }
+}
+
+template("run_executable_foreach") {
+ action_foreach("${target_name}") {
+ script = "//build/gn_run_binary.py"
+
+ if (defined(invoker.sources)) { sources = invoker.sources }
+ if (defined(invoker.outputs)) { outputs = invoker.outputs }
+ if (defined(invoker.source_prereqs)) {
+ source_prereqs = invoker.source_prereqs
+ }
+
+ args = [
+ rebase_path(root_out_dir + "/" + invoker.binary_name, root_build_dir)
+ ]
+ if (defined(invoker.args)) {
+ args += invoker.args
+ }
+
+ datadeps = [ "//build:gn_helper_scripts" ]
+ if (defined(invoker.datadeps)) {
+ datadeps += invoker.datadeps
+ }
+ if (defined(invoker.deps)) { deps = invoker.deps }
+ }
+}
+

Powered by Google App Engine
This is Rietveld 408576698