-
Notifications
You must be signed in to change notification settings - Fork 2.1k
build-system: auto-locate modules by name #16465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Only locate non-pseudo-modules | ||
| MODS2LOCATE := $(filter-out $(PSEUDOMODULES) $(NO_AUTOLOCATE),\ | ||
| $(USEMODULE)) $(filter $(NO_PSEUDOMODULES),$(USEMODULE)) | ||
| EXTERNAL_MODULE_PATHS := $(sort $(foreach dir,$(EXTERNAL_MODULE_DIRS),\ | ||
| $(foreach mod,$(MODS2LOCATE),$(dir $(wildcard $(dir)/$(mod)/Makefile))))) | ||
|
|
||
| # Ignore modules already located as external modules | ||
| MODS2LOCATE := $(filter-out $(basename $(EXTERNAL_MODULE_PATHS)),$(MODS2LOCATE)) | ||
|
|
||
| MODULE_PATHS := $(sort $(foreach dir,$(MODULE_DIRS),\ | ||
| $(foreach mod,$(MODS2LOCATE),$(dir $(wildcard $(dir)/$(mod)/Makefile))))) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -698,6 +698,7 @@ ifneq (,$(filter xtimer,$(USEMODULE))) | |
| endif | ||
| else | ||
| # ztimer_xtimer_compat is used, all of *xtimer's API will be mapped on ztimer.* | ||
| NO_AUTOLOCATE += xtimer | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Won't this be affected by the order of inclusion?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The location of modules is done fully again at each recursion step. If xtimer would be auto-located in a transient state, it would be dropped later on. But some care should be taken so that an A bit of a foot gun, but choosing different implementation options for the same API is just not properly modeled in the build system, so some friction is expected. |
||
| endif | ||
| endif | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1 @@ | ||
| MODULE = sys_bus | ||
|
|
||
| include $(RIOTBASE)/Makefile.base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is mods2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modules to locate ;-)