diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index e04a93ecd7..5778c5ca56 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -516,9 +516,9 @@ $$($(2)_TARGET_DIRCLEAN): PKG=$(2) # kernel case, the bootloaders case, and the normal packages case. ifeq ($(1),linux) $(2)_KCONFIG_VAR = BR2_LINUX_KERNEL -else ifeq ($(4),boot/) +else ifneq ($(filter boot/%,$(pkgdir)),) $(2)_KCONFIG_VAR = BR2_TARGET_$(2) -else ifeq ($(4),toolchain/) +else ifneq ($(filter toolchain/%,$(pkgdir)),) $(2)_KCONFIG_VAR = BR2_$(2) else $(2)_KCONFIG_VAR = BR2_PACKAGE_$(2)