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

Unified Diff: chrome/version.gni

Issue 489223002: Add chrome, installer_util targets to GN build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
« no previous file with comments | « chrome/renderer/BUILD.gn ('k') | printing/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/version.gni
diff --git a/chrome/version.gni b/chrome/version.gni
new file mode 100644
index 0000000000000000000000000000000000000000..771ea28541d39b6ea0373a6485e6132622b4dfbd
--- /dev/null
+++ b/chrome/version.gni
@@ -0,0 +1,60 @@
+# 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.
+
+# Runs the version processing script over the given template file to produce
+# an output file. This is used for generating various forms of files that
+# incorporate the product name and version.
+#
+# This template automatically includes VERSION, LASTCHANGE, and BRANDING,
+#
+# Parameters:
+# source:
+# File name of source template file to read.
+#
+# output:
+# File name of file to write.
+#
+# visibility (optional)
+#
+# Example:
+# process_version("myversion") {
+# source = "myfile.h.in"
+# output = "$target_gen_dir/myfile.h"
+# }
+template("process_version") {
+ assert(defined(invoker.source), "Source must be defined for $target_name")
+ assert(defined(invoker.output), "Output must be defined for $target_name")
+
+ action(target_name) {
+ if (defined(invoker.visibility)) {
+ visibility = invoker.visibility
+ }
+ script = "//build/util/version.py"
+
+ lastchange_path = "//build/util/LASTCHANGE"
+ version_path = "//chrome/VERSION"
+ if (is_chrome_branded) {
+ branding_path = "//chrome/app/theme/google_chrome/BRANDING"
+ } else {
+ branding_path = "//chrome/app/theme/chromium/BRANDING"
+ }
+
+ inputs = [
+ version_path,
+ invoker.source,
+ lastchange_path,
+ branding_path,
+ ]
+
+ outputs = [ invoker.output ]
+
+ args = [
+ "-f", rebase_path(version_path, root_build_dir),
+ "-f", rebase_path(branding_path, root_build_dir),
scottmg 2014/08/20 21:38:12 i know this is moved, but it looks wrong. -t -e ma
+ "-f", rebase_path(lastchange_path, root_build_dir),
+ rebase_path(invoker.source, root_build_dir),
+ rebase_path(invoker.output, root_build_dir),
+ ]
+ }
+}
« no previous file with comments | « chrome/renderer/BUILD.gn ('k') | printing/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698