summaryrefslogtreecommitdiff
path: root/genconfig.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2019-05-29 07:29:20 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2019-05-31 00:08:14 +0200
commit175c1f5a363e51a76a7dc1fe807f7c3faf40ab23 (patch)
tree32adbe8643337017845827f324213e156bcebb09 /genconfig.py
parent556dcdd252bd312b1da21f84f4775cbbba0dd8c4 (diff)
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.
Diffstat (limited to 'genconfig.py')
-rwxr-xr-xgenconfig.py10
1 files changed, 9 insertions, 1 deletions
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.
"""