From 175c1f5a363e51a76a7dc1fe807f7c3faf40ab23 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Wed, 29 May 2019 07:29:20 +0200 Subject: Leave unchanged output files untouched Before writing a configuration file or header file, compare the old contents of the file against the new contents. If there's no change, skip the write, to avoid updating the file modification time. This might avoid triggering redundant rebuilds depending on how the build system is set up, and could allow for a simpler setup. --- genconfig.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'genconfig.py') diff --git a/genconfig.py b/genconfig.py index c575c9a..ba2bb73 100755 --- a/genconfig.py +++ b/genconfig.py @@ -7,10 +7,18 @@ Generates a header file with #defines from the configuration, matching the format of include/generated/autoconf.h in the Linux kernel. -Optionally creates/updates a directory structure with one file per symbol that +Optionally, also writes the configuration output as a .config file. See +--config-out. + +Optionally, creates/updates a directory structure with one file per symbol that can be used to implement incremental builds. See the docstring for Kconfig.sync_deps() in kconfiglib.py. +Before writing a header file or other configuration output, Kconfiglib compares +the old contents of the file against the new contents. If there's no change, +the write is skipped. This avoids updating file metadata like the modification +time, and might save work depending on your build setup. + By default, the configuration is generated from '.config'. A different configuration file can be passed in the KCONFIG_CONFIG environment variable. """ -- cgit v1.2.3