summaryrefslogtreecommitdiffstats
path: root/build/util
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-20 22:21:03 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-20 22:21:03 +0000
commit1edf8e947995a5d7c38a0acee6de4afc8a830762 (patch)
tree8722b4a9b655921f8f8f43e9ad67148e3438fe58 /build/util
parent098cc8deab42ea257b4c0418adc5a60d62b1efaf (diff)
downloadchromium_src-1edf8e947995a5d7c38a0acee6de4afc8a830762.zip
chromium_src-1edf8e947995a5d7c38a0acee6de4afc8a830762.tar.gz
chromium_src-1edf8e947995a5d7c38a0acee6de4afc8a830762.tar.bz2
Move files from the secondary GN directory to build.
Since this build is looking less experimental, I'm moving the files out of secondary into the corresponding location in src/build. I added owners files that just include me. For now I'd like to review all changes here. BUG= R=scottmg@chromium.org Review URL: https://codereview.chromium.org/68793009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236319 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/util')
-rw-r--r--build/util/BUILD.gn35
-rw-r--r--build/util/OWNERS2
2 files changed, 37 insertions, 0 deletions
diff --git a/build/util/BUILD.gn b/build/util/BUILD.gn
new file mode 100644
index 0000000..d43cc49
--- /dev/null
+++ b/build/util/BUILD.gn
@@ -0,0 +1,35 @@
+# Copyright (c) 2013 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.
+
+# This target generates a "last_change.h" header file in the generated files
+# directory that contains a define of the last revision of the source tree
+# of the form:
+# #define LAST_CHANGE "123456"
+#
+# The version is a string rather than an integer for extra flexibility (for
+# example, we may require git hashes in the future).
+#
+# All you nede to do is depend on this target, and then from your source code:
+# #include "build/util/last_change.h"
+custom("last_change") {
+ script = "//build/util/lastchange.py"
+
+ # This script must be run before targets depending on us.
+ hard_dep = true
+
+ # Rerun the script any time this file changes.
+ source_prereqs = [ "//build/util/LASTCHANGE" ]
+
+ output_header = "$target_gen_dir/last_change.h"
+ outputs = [ output_header ]
+
+ build_relative_src = rebase_path("//", ".", root_build_dir)
+ build_relative_outputs = rebase_path(output_header, ".", root_build_dir)
+
+ args = [
+ "--source-dir=$build_relative_src",
+ "--header=$build_relative_outputs",
+ "--version-macro=LAST_CHANGE",
+ ]
+}
diff --git a/build/util/OWNERS b/build/util/OWNERS
new file mode 100644
index 0000000..ecd4e38
--- /dev/null
+++ b/build/util/OWNERS
@@ -0,0 +1,2 @@
+per-file BUILD.gn=set noparent
+per-file BUILD.gn=brettw@chromium.org