Skip to content

Commit 18d6b53

Browse files
committed
Merge branch 'fix/dont-regenerate-unnecessary-config-files' into 'master'
fix(kconfig.cmake): Do not regenerate unnecessary config files Closes IDF-14220 See merge request espressif/esp-idf!42231
2 parents 4dc77d1 + f7393ab commit 18d6b53

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tools/cmake/kconfig.cmake

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,9 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults)
281281
endif()
282282

283283
# Generate the menuconfig target
284+
# WARNING: If you change anything here, please ensure that only the necessary files are touched!
285+
# If unnecessary files (those not affected by the change from menuconfig) are touched
286+
# (their timestamp changed), it will cause unnecessary rebuilds of the whole project!
284287
add_custom_target(menuconfig
285288
${menuconfig_depends}
286289
# create any missing config file, with defaults if necessary
@@ -291,7 +294,7 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults)
291294
--env "IDF_ENV_FPGA=${idf_env_fpga}"
292295
--env "IDF_INIT_VERSION=${idf_init_version}"
293296
--dont-write-deprecated
294-
${kconfgen_output_options}
297+
--output config ${sdkconfig} # Do NOT regenerate the rest of the config files!
295298
COMMAND ${TERM_CHECK_CMD}
296299
COMMAND ${CMAKE_COMMAND} -E env
297300
"COMPONENT_KCONFIGS_SOURCE_FILE=${kconfigs_path}"
@@ -304,8 +307,8 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults)
304307
"IDF_MINIMAL_BUILD=${idf_minimal_build}"
305308
${MENUCONFIG_CMD} ${root_kconfig}
306309
USES_TERMINAL
307-
# additional run of kconfgen esures that the deprecated options will be inserted into sdkconfig (for backward
308-
# compatibility)
310+
# additional run of kconfgen ensures that the deprecated options will be inserted into config files
311+
# (for backward compatibility)
309312
COMMAND ${kconfgen_basecommand}
310313
--env "IDF_TARGET=${idf_target}"
311314
--env "IDF_TOOLCHAIN=${idf_toolchain}"

0 commit comments

Comments
 (0)