Commit 1941386c authored by Thomas De Schampheleire's avatar Thomas De Schampheleire Committed by Thomas Petazzoni
Browse files

kconfig infra: make update-config/defconfig handling symmetrical



Replace a 'cp --preserve' with a 'touch --reference' so that the code
for foo-update-config and foo-update-defconfig is symmetrical to ease
maintainability and increase clarity.

Signed-off-by: default avatarThomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: default avatar"Yann E. Morin" <yann.morin.1998@free.fr>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 39867f3c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -78,8 +78,11 @@ $(1)-savedefconfig: $$($(2)_DIR)/.stamp_kconfig_fixup_done
		$$($(2)_KCONFIG_OPTS) savedefconfig

# Target to copy back the configuration to the source configuration file
# Even though we could use 'cp --preserve-timestamps' here, the separate
# cp and 'touch --reference' is used for symmetry with $(1)-update-defconfig.
$(1)-update-config: $$($(2)_DIR)/.stamp_kconfig_fixup_done
	cp --preserve=timestamps -f $$($(2)_DIR)/.config $$($(2)_KCONFIG_FILE)
	cp -f $$($(2)_DIR)/.config $$($(2)_KCONFIG_FILE)
	touch --reference $$($(2)_DIR)/.config $$($(2)_KCONFIG_FILE)

# Note: make sure the timestamp of the stored configuration is not newer than
# the .config to avoid a useless rebuild. Note that, contrary to