aboutsummaryrefslogtreecommitdiffstats
path: root/genrule
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2015-05-11 13:39:40 -0700
committerColin Cross <ccross@android.com>2015-06-29 10:36:02 -0700
commit7d5136f03350ca18dd8e3b9b34725973f2aa26a0 (patch)
treea23fe8c9249d445627fcf8c89c35945ecd0b7438 /genrule
parent0bc42685eedb2a520fd3e9b2d950ba24e521c0d2 (diff)
downloadbuild_soong-7d5136f03350ca18dd8e3b9b34725973f2aa26a0.tar.gz
build_soong-7d5136f03350ca18dd8e3b9b34725973f2aa26a0.tar.bz2
build_soong-7d5136f03350ca18dd8e3b9b34725973f2aa26a0.zip
Improve property comments for docs
Improve the comments associated with properties to work better with Blueprint's auto-documenting feature. Make all properties structs into named types so that thet types can be found using reflection and cross-referenced to the source code to auto-extract docs. Remove the leading <property>: text from properties, the documentation will include the lowercased name of the property. Add filter tags to the nested arch properties. Change-Id: I4ef5db86358886fe61456c24eb2dbe6f7b876115
Diffstat (limited to 'genrule')
-rw-r--r--genrule/genrule.go34
1 files changed, 18 insertions, 16 deletions
diff --git a/genrule/genrule.go b/genrule/genrule.go
index ea30e3d1..b3938318 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -40,21 +40,23 @@ type HostToolProvider interface {
HostToolPath() string
}
+type generatorProperties struct {
+ // command to run on one or more input files. Available variables for substitution:
+ // $in: one or more input files
+ // $out: a single output file
+ // $srcDir: the root directory of the source tree
+ // The host bin directory will be in the path
+ Cmd string
+
+ // name of the module (if any) that produces the host executable. Leave empty for
+ // prebuilts or scripts that do not need a module to build them.
+ Tool string
+}
+
type generator struct {
common.AndroidModuleBase
- properties struct {
- // cmd: command to run on one or more input files. Available variables for substitution:
- // $in: one or more input files
- // $out: a single output file
- // $srcDir: the root directory of the source tree
- // The host bin directory will be in the path
- Cmd string
-
- // tool: name of the module (if any) that produces the host executable. Leave empty for
- // prebuilts or scripts that do not need a module to build them.
- Tool string
- }
+ properties generatorProperties
tasks taskFunc
@@ -146,10 +148,10 @@ func GenSrcsFactory() (blueprint.Module, []interface{}) {
}
type genSrcsProperties struct {
- // srcs: list of input files
+ // list of input files
Srcs []string
- // output_extension: extension that will be substituted for each output file
+ // extension that will be substituted for each output file
Output_extension string
}
@@ -169,9 +171,9 @@ func GenRuleFactory() (blueprint.Module, []interface{}) {
}
type genRuleProperties struct {
- // srcs: list of input files
+ // list of input files
Srcs []string
- // out: name of the output file that will be generated
+ // name of the output file that will be generated
Out string
}