3 Commits

Author SHA1 Message Date
Fennelfoxxo
e8094340a3 Build: Add output file diffing to config_gen.py
Currently, whenever CMake is reconfigured, config_gen.py will always
regenerate the output config header and json, forcing a timestamp
update and a rebuild. This change adds a --skip-unchanged option which
skips writing to the output file if the write would not change the
file's contents. The default is off to avoid breaking builds that rely
on the existing behavior of always overwriting.

Signed-off-by: James Martin <fennelfoxxo@gmail.com>
2025-04-27 11:33:45 +10:00
Fennelfoxxo
162a38e865 Build: Allow optional output in config_gen.py
Previously, config_gen.py required the generated header and json to be
either written to a file or sent to stdout. This meant that there was
no way to avoid writing to a file, as the header and json data would be
merged into the same stdout stream. This change makes it so that the
header or json generation can be suppressed entirely by omitting the
corresponding --write-c or --write-json options.

Signed-off-by: James Martin <fennelfoxxo@gmail.com>
2025-04-27 11:33:45 +10:00
Nick Spinale
c642a398ba cmake: provide gen_config.json
gen_config.json provides a language-independent means of accessing the
kernel configuration. Before, gen_config.h was generated directly in
CMake.  Now, gen_config.yaml is generated directly in CMake, and
gen_config.h and gen_config.json are derived from gen_config.yaml.

Signed-off-by: Nick Spinale <nick@nickspinale.com>
2023-03-02 09:31:42 +11:00