diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk index 715c3e04ec..66cb91862e 100644 --- a/package/pkg-kconfig.mk +++ b/package/pkg-kconfig.mk @@ -279,8 +279,11 @@ $(1)-check-configuration-done: exit 1; \ fi +ifeq ($$($(2)_KCONFIG_SUPPORTS_DEFCONFIG),YES) +.PHONY: $(1)-savedefconfig $(1)-savedefconfig: $(1)-check-configuration-done $$(call kconfig-package-savedefconfig,$(2)) +endif # Target to copy back the configuration to the source configuration file # Even though we could use 'cp --preserve-timestamps' here, the separate @@ -289,13 +292,16 @@ $(1)-update-config: PKG=$(2) $(1)-update-config: $(1)-check-configuration-done $$(call kconfig-package-update-config,$$($(2)_KCONFIG_DOTCONFIG)) +ifeq ($$($(2)_KCONFIG_SUPPORTS_DEFCONFIG),YES) # Note: make sure the timestamp of the stored configuration is not newer than # the .config to avoid a useless rebuild. Note that, contrary to # $(1)-update-config, the reference for 'touch' is _not_ the file from which # we copy. +.PHONY: $(1)-update-defconfig $(1)-update-defconfig: PKG=$(2) $(1)-update-defconfig: $(1)-savedefconfig $$(call kconfig-package-update-config,defconfig) +endif # Target to output differences between the configuration obtained via the # defconfig + fragments (if any) and the current configuration. @@ -315,9 +321,7 @@ endif # package enabled .PHONY: \ $(1)-update-config \ - $(1)-update-defconfig \ $(1)-diff-config \ - $(1)-savedefconfig \ $(1)-check-configuration-done \ $$($(2)_DIR)/.kconfig_editor_% \ $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS))