mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #17596 from fjmolinas/pr_external_module_deps_kconfig
makefiles.kconfig.mk: use EXTERNAL_MODULE_DIRS in Kconfig resolution
This commit is contained in:
commit
9b95605f78
@ -431,6 +431,8 @@ ifeq (1,$(TEST_KCONFIG))
|
|||||||
# Locate used packages in $(RIOTPKG).
|
# Locate used packages in $(RIOTPKG).
|
||||||
PKG_PATHS := $(sort $(foreach dir,$(RIOTPKG),\
|
PKG_PATHS := $(sort $(foreach dir,$(RIOTPKG),\
|
||||||
$(foreach pkg,$(USEPKG),$(dir $(wildcard $(dir)/$(pkg)/Makefile)))))
|
$(foreach pkg,$(USEPKG),$(dir $(wildcard $(dir)/$(pkg)/Makefile)))))
|
||||||
|
|
||||||
|
EXTERNAL_MODULE_PATHS := $(dir $(EXTERNAL_MODULE_KCONFIGS))
|
||||||
else
|
else
|
||||||
# always select provided architecture features
|
# always select provided architecture features
|
||||||
FEATURES_REQUIRED += $(filter arch_%,$(FEATURES_PROVIDED))
|
FEATURES_REQUIRED += $(filter arch_%,$(FEATURES_PROVIDED))
|
||||||
|
@ -179,8 +179,8 @@ $(KCONFIG_GENERATED_ENV_CONFIG): FORCE | $(GENERATED_DIR)
|
|||||||
| $(LAZYSPONGE) $(LAZYSPONGE_FLAGS) $@
|
| $(LAZYSPONGE) $(LAZYSPONGE_FLAGS) $@
|
||||||
|
|
||||||
# All directories in EXTERNAL_MODULES_PATHS which have a Kconfig file
|
# All directories in EXTERNAL_MODULES_PATHS which have a Kconfig file
|
||||||
EXTERNAL_MODULE_KCONFIGS ?= $(sort $(foreach dir,$(EXTERNAL_MODULE_PATHS),\
|
EXTERNAL_MODULE_KCONFIGS ?= $(sort $(foreach dir,$(EXTERNAL_MODULE_DIRS),\
|
||||||
$(wildcard $(dir)/Kconfig)))
|
$(wildcard $(dir)/*/Kconfig)))
|
||||||
# Build a Kconfig file that source all external modules configuration
|
# Build a Kconfig file that source all external modules configuration
|
||||||
# files. Every EXTERNAL_MODULE_DIRS with a Kconfig file is written to
|
# files. Every EXTERNAL_MODULE_DIRS with a Kconfig file is written to
|
||||||
# KCONFIG_EXTERNAL_CONFIGS as 'osource dir/Kconfig'
|
# KCONFIG_EXTERNAL_CONFIGS as 'osource dir/Kconfig'
|
||||||
|
@ -4,4 +4,8 @@ USEMODULE += external_module_1
|
|||||||
USEMODULE += external_module_2
|
USEMODULE += external_module_2
|
||||||
EXTERNAL_MODULE_DIRS += external_modules
|
EXTERNAL_MODULE_DIRS += external_modules
|
||||||
|
|
||||||
|
ifeq (1, $(TEST_KCONFIG))
|
||||||
|
KCONFIG_ADD_CONFIG += $(APPDIR)/app.config
|
||||||
|
endif
|
||||||
|
|
||||||
include $(RIOTBASE)/Makefile.include
|
include $(RIOTBASE)/Makefile.include
|
||||||
|
2
tests/kconfig/app.config.test
Normal file
2
tests/kconfig/app.config.test
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
CONFIG_MODULE_EXTERNAL_MODULE_1=y
|
||||||
|
CONFIG_MODULE_EXTERNAL_MODULE_2=y
|
@ -11,3 +11,7 @@ config EXTERNAL_MODULE_1_MESSAGE
|
|||||||
default "External Message 1 defined in Kconfig file"
|
default "External Message 1 defined in Kconfig file"
|
||||||
|
|
||||||
endif # KCONFIG_EXTERNAL_MODULE_1
|
endif # KCONFIG_EXTERNAL_MODULE_1
|
||||||
|
|
||||||
|
config MODULE_EXTERNAL_MODULE_1
|
||||||
|
bool "Select external module 2"
|
||||||
|
depends on TEST_KCONFIG
|
||||||
|
@ -11,3 +11,7 @@ config EXTERNAL_MODULE_2_MESSAGE
|
|||||||
default "External Message 2 defined in Kconfig file"
|
default "External Message 2 defined in Kconfig file"
|
||||||
|
|
||||||
endif # KCONFIG_EXTERNAL_MODULE_2
|
endif # KCONFIG_EXTERNAL_MODULE_2
|
||||||
|
|
||||||
|
config MODULE_EXTERNAL_MODULE_2
|
||||||
|
bool "Select external module 2"
|
||||||
|
depends on TEST_KCONFIG
|
||||||
|
Loading…
Reference in New Issue
Block a user