aboutsummaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorGravatar Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>2021-07-25 16:11:46 +0200
committerGravatar Yann E. MORIN <yann.morin.1998@free.fr>2021-07-31 13:31:23 +0200
commitde669abcb40ea20a685c7269efd79f94ee95381d (patch)
tree5d347b4b2a8a416220ab3585086714518f4e8138 /package
parentd0c82f20c75f683d8cafde08a0e558a9a13d3ded (diff)
downloadbuildroot-master.tar.gz
buildroot-master.tar.bz2
package/pkg-kconfig: only define -update-{def, }config if supportedHEADmaster
The foo-update-config and foo-update-defconfig targets only work if a custom config file was defined. Remove those targets entirely if they don't work to begin with. This was originally handled with an error condition in the kconfig-package-update-config macro. However, it makes more sense to simply remove the target if it anyway can't be used. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> [yann.morin.1998@free.fr: move PHONY before corresponding rule] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Diffstat (limited to 'package')
-rw-r--r--package/pkg-kconfig.mk9
1 files changed, 6 insertions, 3 deletions
diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk
index 66cb91862e..23a291fccf 100644
--- a/package/pkg-kconfig.mk
+++ b/package/pkg-kconfig.mk
@@ -12,12 +12,12 @@
################################################################################
# Macro to update back the custom (def)config file
+# Must only be called if $(PKG)_KCONFIG_FILE is set and $(PKG)_KCONFIG_DEFCONFIG)
+# is not set.
# $(1): file to copy from
define kconfig-package-update-config
@$(if $($(PKG)_KCONFIG_FRAGMENT_FILES), \
echo "Unable to perform $(@) when fragment files are set"; exit 1)
- @$(if $($(PKG)_KCONFIG_DEFCONFIG), \
- echo "Unable to perform $(@) when using a defconfig rule"; exit 1)
$(Q)if [ -d $($(PKG)_KCONFIG_FILE) ]; then \
echo "Unable to perform $(@) when $($(PKG)_KCONFIG_FILE) is a directory"; \
exit 1; \
@@ -285,9 +285,11 @@ $(1)-savedefconfig: $(1)-check-configuration-done
$$(call kconfig-package-savedefconfig,$(2))
endif
+ifeq ($$($(2)_KCONFIG_DEFCONFIG),)
# 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.
+.PHONY: $(1)-update-config
$(1)-update-config: PKG=$(2)
$(1)-update-config: $(1)-check-configuration-done
$$(call kconfig-package-update-config,$$($(2)_KCONFIG_DOTCONFIG))
@@ -303,6 +305,8 @@ $(1)-update-defconfig: $(1)-savedefconfig
$$(call kconfig-package-update-config,defconfig)
endif
+endif
+
# Target to output differences between the configuration obtained via the
# defconfig + fragments (if any) and the current configuration.
# Note: it preserves the timestamp of the current configuration when moving it
@@ -320,7 +324,6 @@ $(1)-diff-config: $(1)-check-configuration-done
endif # package enabled
.PHONY: \
- $(1)-update-config \
$(1)-diff-config \
$(1)-check-configuration-done \
$$($(2)_DIR)/.kconfig_editor_% \