diff options
author | Petr Štetiar <ynezz@true.cz> | 2022-03-29 08:30:32 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2022-04-17 21:27:07 +0200 |
commit | e723bcbac0097fd94938d615bf2fef2ee282d477 (patch) | |
tree | 0def9a51a33fcddd4783c7abac36b6f44ba588ea /include | |
parent | 75b83e94a395fedeb4d308f42013a72c6fee2df4 (diff) | |
download | upstream-e723bcbac0097fd94938d615bf2fef2ee282d477.tar.gz upstream-e723bcbac0097fd94938d615bf2fef2ee282d477.tar.bz2 upstream-e723bcbac0097fd94938d615bf2fef2ee282d477.zip |
build: target: improve UX of CONFIG_TARGET handling
Make it clear, that for `make kernel_{menu,old}config` it's possible to
use only following values for CONFIG_TARGET variable:
* env
* target
* subtarget
* subtarget_target
This should prevent misuse like `make kernel_menuconfig
CONFIG_TARGET=bcm2710` etc.
Keep support for obsolete `platform` and `subtarget_platform` targets
with deprecation notice so this compat stuff could be removed in the
future.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
Acked-by: Piotr Dymacz <pepe2k@gmail.com>
(cherry picked from commit 68e672f32df3d6b8a75534df5962ac99b693601b)
Diffstat (limited to 'include')
-rw-r--r-- | include/target.mk | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/include/target.mk b/include/target.mk index 72fe493776..a2c8b7bdbf 100644 --- a/include/target.mk +++ b/include/target.mk @@ -173,22 +173,30 @@ USE_SUBTARGET_CONFIG = $(if $(wildcard $(LINUX_TARGET_CONFIG)),,$(if $(LINUX_SUB LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_TARGET_CONFIG) $(if $(USE_SUBTARGET_CONFIG),$(LINUX_SUBTARGET_CONFIG))) LINUX_RECONFIG_TARGET = $(if $(USE_SUBTARGET_CONFIG),$(LINUX_SUBTARGET_CONFIG),$(LINUX_TARGET_CONFIG)) +CFG_TARGET = $(CONFIG_TARGET) +ifeq ($(CFG_TARGET),platform) + CFG_TARGET = target + $(warning Deprecation warning: use CONFIG_TARGET=target instead.) +else ifeq ($(CFG_TARGET),subtarget_platform) + CFG_TARGET = subtarget_target + $(warning Deprecation warning: use CONFIG_TARGET=subtarget_target instead.) +endif + # select the config file to be changed by kernel_menuconfig/kernel_oldconfig -ifeq ($(CONFIG_TARGET),platform) +ifeq ($(CFG_TARGET),target) LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_TARGET_CONFIG)) LINUX_RECONFIG_TARGET = $(LINUX_TARGET_CONFIG) -endif -ifeq ($(CONFIG_TARGET),subtarget) +else ifeq ($(CFG_TARGET),subtarget) LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_TARGET_CONFIG) $(LINUX_SUBTARGET_CONFIG)) LINUX_RECONFIG_TARGET = $(LINUX_SUBTARGET_CONFIG) -endif -ifeq ($(CONFIG_TARGET),subtarget_platform) +else ifeq ($(CFG_TARGET),subtarget_target) LINUX_RECONFIG_LIST = $(wildcard $(GENERIC_LINUX_CONFIG) $(LINUX_SUBTARGET_CONFIG) $(LINUX_TARGET_CONFIG)) LINUX_RECONFIG_TARGET = $(LINUX_TARGET_CONFIG) -endif -ifeq ($(CONFIG_TARGET),env) +else ifeq ($(CFG_TARGET),env) LINUX_RECONFIG_LIST = $(LINUX_KCONFIG_LIST) LINUX_RECONFIG_TARGET = $(TOPDIR)/env/kernel-config +else ifneq ($(strip $(CFG_TARGET)),) + $(error CONFIG_TARGET=$(CFG_TARGET) is invalid. Valid: target|subtarget|subtarget_target|env) endif __linux_confcmd = $(2) $(patsubst %,+,$(wordlist 2,9999,$(1))) $(1) |