zephyr/scripts/kconfig
Jordan Yates 79e467c92a scripts: kconfig: kconfiglib: introduce `configdefault`
Introduce the `configdefault` keyword as a Kconfig extension. This new
keyword allows `default` values to be applied to externally defined
symbols without needing to respecify dependencies, or weakening the
existing dependencies.

This is primarily useful in downstream repositories that wish to define
default configurations such as:
```
config MY_COMPANY_APPS
    bool "Apply defaults for internal applications"

configdefault BT
    default y if MY_COMPANY_APPS
configdefault MCUMGR
    default y if MY_COMPANY_APPS && BT
```

Obtaining the same functionality with `config` (without weakening the
symbol dependencies) requires finding the original definition and
duplicating any `depends on` and surrounding `if` statements. This is a
non-trivial exercise that needs to be manually rechecked on each Zephyr
update.

`configdefault` simplifies this process by acting as if the `default`
statement was present at any one of the original definitions of the
symbol.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2023-10-26 09:47:06 +02:00
..
diffconfig
guiconfig.py
hardenconfig.py
hardened.csv
kconfig.py
kconfigfunctions.py
kconfiglib.py scripts: kconfig: kconfiglib: introduce `configdefault` 2023-10-26 09:47:06 +02:00
lint.py
menuconfig.py