[riot-notifications] [RIOT-OS/RIOT] Introduce module vars (#10928)

Gaƫtan Harter notifications at github.com
Mon Feb 4 11:09:49 CET 2019

As it is an RFC, I put remarks here as I find it better than inline.

I like the idea and thought about it already. Having the "target" name in the variable is make way to provide namespaces.
Also, it goes into a way more declarative format and can force solving currently unclear things, even more when applied to dependencies.
I just did not find time to start a migration and enough attention to review, so good that there is interest.

One technical thing, not sure if good or bad, the separator `.` is not part of a valid environment variable identifier which prevent these variables to be exported.
Which means, that if, currently, it would be used to define private module cflags for example, it could not because of the multi-level recursive makefiles.
One good thing, it would drive to remove the multi-level recursion and use them in target specific variables.
This would allow moving more declarations to the main Makefile.include and so have all the information to not even go in a module directory if it is up to date.
So good in the long term.

For the implementation detail, I am not in favor of the magic part with the `foreach`

$(foreach var,$(MODULE_VARS),$(eval $(call collect_var,$(var))))

as it hides where a variable is defined and is harder to grep for all things changing a variable.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190204/66760b47/attachment-0001.html>

More information about the notifications mailing list