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
This commit is contained in:
Roland Dobai
2025-10-01 14:52:04 +02:00
+6 -3
View File
@@ -281,6 +281,9 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults)
endif()
# Generate the menuconfig target
# WARNING: If you change anything here, please ensure that only the necessary files are touched!
# If unnecessary files (those not affected by the change from menuconfig) are touched
# (their timestamp changed), it will cause unnecessary rebuilds of the whole project!
add_custom_target(menuconfig
${menuconfig_depends}
# create any missing config file, with defaults if necessary
@@ -291,7 +294,7 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults)
--env "IDF_ENV_FPGA=${idf_env_fpga}"
--env "IDF_INIT_VERSION=${idf_init_version}"
--dont-write-deprecated
${kconfgen_output_options}
--output config ${sdkconfig} # Do NOT regenerate the rest of the config files!
COMMAND ${TERM_CHECK_CMD}
COMMAND ${CMAKE_COMMAND} -E env
"COMPONENT_KCONFIGS_SOURCE_FILE=${kconfigs_path}"
@@ -304,8 +307,8 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults)
"IDF_MINIMAL_BUILD=${idf_minimal_build}"
${MENUCONFIG_CMD} ${root_kconfig}
USES_TERMINAL
# additional run of kconfgen esures that the deprecated options will be inserted into sdkconfig (for backward
# compatibility)
# additional run of kconfgen ensures that the deprecated options will be inserted into config files
# (for backward compatibility)
COMMAND ${kconfgen_basecommand}
--env "IDF_TARGET=${idf_target}"
--env "IDF_TOOLCHAIN=${idf_toolchain}"