diff options
author | 2016-06-03 00:31:40 +0000 | |
---|---|---|
committer | 2016-06-03 12:53:53 +0000 | |
commit | 23d5e1f766846e3f0370576dbe53d01a62fb1ba3 (patch) | |
tree | 275367e619cc9e7bd8b29be7ee2b80f56e350791 /src | |
parent | a50b7b710b423af2ac00f3cf4e238449efbf48c7 (diff) |
Clarify documentation of why glob() does not apply to generated files.
Correct example code.
See also
--
MOS_MIGRATED_REVID=123925214
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/google/devtools/build/docgen/templates/be/functions.vm | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/main/java/com/google/devtools/build/docgen/templates/be/functions.vm b/src/main/java/com/google/devtools/build/docgen/templates/be/functions.vm index b1b94dc40b..19784a3564 100644 --- a/src/main/java/com/google/devtools/build/docgen/templates/be/functions.vm +++ b/src/main/java/com/google/devtools/build/docgen/templates/be/functions.vm @@ -413,11 +413,17 @@ There are several important limitations and caveats: <ol> <li> - Globs only match files in your source tree, never + Since <code>glob()</code> runs during BUILD file evaluation, + <code>glob()</code> matches files only in your source tree, never generated files. If you are building a target that requires both - source and generated files, create an explicit list of generated - files, and use <code>+</code> to add it to the result of the - <code>glob()</code> call. + source and generated files, create a list of generated + files. This list can be specified by using the labels for the generated + files or using the label + for the target that produces the generated files. + Use <code>+</code> to add the list of + generated files to the result of the <code>glob()</code> call as shown in + the <a href="#glob_example">example</a> + below with the target <code>:gen_java_srcs</code>. </li> <li> @@ -485,7 +491,7 @@ and all files generated by the <code>:gen_java_srcs</code> rule.</p> <pre class="code"> java_library( name = "mylib", - srcs = glob(["*.java"]) + [":localize_strings"], + srcs = glob(["*.java"]) + [":gen_java_srcs"], deps = "...", ) |