aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2024-04-23 01:14:46 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2024-04-23 01:14:46 +0000
commit4eecd990d94e9ae6ff72b894c06c10a08603a1a9 (patch)
tree79522304d466dfc8aa0b8e4560ece982f8af5215
parentd47220d470b7d98be8b0c888353b49b5e50b371e (diff)
parentaa1ce0385c358994bbeb7a05ba352da5ab65180e (diff)
downloadsoong-4eecd990d94e9ae6ff72b894c06c10a08603a1a9.tar.gz
Merge "Add more comments about soong config variables" into main
-rw-r--r--README.md34
1 files changed, 24 insertions, 10 deletions
diff --git a/README.md b/README.md
index 42fecb4d4..140822b70 100644
--- a/README.md
+++ b/README.md
@@ -463,18 +463,32 @@ soong_config_string_variable {
This example describes a new `acme_cc_defaults` module type that extends the
`cc_defaults` module type, with four additional conditionals based on variables
`board`, `feature`, `impl` and `width` which can affect properties `cflags` and
-`srcs`. Additionally, each conditional will contain a `conditions_default`
-property can affect `cflags` and `srcs` in the following conditions:
-
-* bool variable (e.g. `feature`): the variable is unspecified or not set to a true value
+`srcs`. The four types of soong variables control properties in the following
+ways.
+
+* bool variable (e.g. `feature`): Properties are applied if set to `true`.
+* list variable (e.g. `impl`): (lists of strings properties only) Properties are
+ applied for each value in the list, using `%s` substitution. For example, if
+ the property is `["%s.cpp", "%s.h"]` and the list value is `foo bar`,
+ the result is `["foo.cpp", "foo.h", "bar.cpp", "bar.h"]`.
+* value variable (e.g. `width`): (strings or lists of strings) The value are
+ directly substituted into properties using `%s`.
+* string variable (e.g. `board`): Properties are applied only if they match the
+ variable's value.
+
+Additionally, each conditional containing a `conditions_default` property can
+affect `cflags` and `srcs` in the following conditions:
+
+* bool variable (e.g. `feature`): the variable is unspecified or not set to
+ `true`
* list variable (e.g. `impl`): the variable is unspecified
* value variable (e.g. `width`): the variable is unspecified
-* string variable (e.g. `board`): the variable is unspecified or the variable is set to a string unused in the
-given module. For example, with `board`, if the `board`
-conditional contains the properties `soc_a` and `conditions_default`, when
-board=soc_b, the `cflags` and `srcs` values under `conditions_default` will be
-used. To specify that no properties should be amended for `soc_b`, you can set
-`soc_b: {},`.
+* string variable (e.g. `board`): the variable is unspecified or the variable is
+ set to a string unused in the given module. For example, with `board`, if the
+ `board` conditional contains the properties `soc_a` and `conditions_default`,
+ when `board` is `soc_b`, the `cflags` and `srcs` values under
+ `conditions_default` is used. To specify that no properties should be amended
+ for `soc_b`, you can set `soc_b: {},`.
The values of the variables can be set from a product's `BoardConfig.mk` file:
```