[riot-notifications] [RIOT-OS/RIOT] Makefile.include: avoid recursive expansion of USEMODULE (#15835)

Leandro Lanzieri notifications at github.com
Fri Jan 22 09:25:10 CET 2021


### Contribution description
The desired behaviour of `DEFAULT_MODULES` during the dependency resolution is to be evaluated once before the dependency resolution occurs and once after that.

Currently `USEMODULE` is appended using `+=` which makes it recursively expanded. That means that it keeps a reference to `DEFAULT_MODULES`, during the first iteration of the process. This breaks the intended behaviour. For example, if some dependency adds a module to `DEFAULT_MODULES` during the first iteration, on a following check `USEMODULE` is updated with that module instantly.

This can be fixed by making `USEMODULE` simply expanded before the dependency resolution starts.

### Testing procedure
- Green CI
- Although this is the correct behaviour, we should watch out for dependencies that may have been working because of this error

### Issues/PRs references
None
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/15835

-- Commit Summary --

  * makefile.include: avoid recursive expansion of USEMODULE

-- File Changes --

    M Makefile.include (3)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/15835.patch
https://github.com/RIOT-OS/RIOT/pull/15835.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15835
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210122/523f57d4/attachment-0001.htm>


More information about the notifications mailing list