-
Notifications
You must be signed in to change notification settings - Fork 2k
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
make: Allow for true pseudo-submodules #10970
Conversation
Ok, I just realized that this causes compilation errors with a minimal application: include ../Makefile.tests_common
DISABLE_MODULE += auto_init
include $(RIOTBASE)/Makefile.include int main(void)
{
return 0;
}
Any idea why? |
The It would be equivalent to by default doing |
What do you mean by "everything else"?
True... don't know, what I was thinking there...
This onl is used by |
I meant around the value:
I think, the reason to not allow real pseudomodules by default and so not do the
|
The thing is, the whole concept of You also would get compile errors if a function your sub-module is supposed to implement is not in the binary (i.e. the C-file is missing). |
Ping @kaspar030? |
Ping @kaspar030 @fjmolinas? |
I don't care much. IMO the make based build system should just go. We're losing hundreds of hours on simple things like this. |
If something is interpreted as a pseudo-module (module without code) or not has nothing to do with the build system, but how it is used. If we would go to a different build system, we could have the same problem. |
@miri64, I think you still need to address the
|
Or |
I'm also in favor of this BTW :) |
That wouldn't work... sub-modules are pseudo-modules. That is the whole problem I am trying to solve. I am not sure I understand the usage of |
It does when using a |
I don't really understand how your comments are meant... Probably, because I don't really know that much about this PR anymore either, but the main idea of this PR is basically: make all pseudo-modules who have C-files according to the pattern defined by |
I think this is what was meant?
|
This variable (neither with or without your typo) does not exist in RIOT master. |
Yes, that's what @cladmi's comment says basically. But at the point you use |
Sorry I did not understand at first, I tested doing the following https://gist.github.com/fjmolinas/e651bcddecd40c437b07513b53ca2074. But I see that its adding a new mechanism to under-do another so looks weird as well. And sorry If I make other unclear comments, I haven't used this mechanism before, so I might miss some things.
Lets say there are the following c files with a
Currently in master if you do |
Huh? You just add that there. So this is not really helpful getting rid of all the submodules from PSEUDOMODULES in a lazy way (
Mh... that is not what I would expect a function named "wildcard" to do. So it is basically |
I would also prefer if we don't make the |
"This string, used anywhere in a makefile, is replaced by a space-separated list of names of existing files that match one of the given file name patterns." I agree with it not being that intuitive, but I think its whats usually done to check if a file exists in |
OK, it worked as you described so I applied the patch accordingly :-) |
In my understanding Currently if a module is implicitly declared as a The only
But the lazy way works as well, and as I'm not willing to address this right now either, so I'm fine with the PR as is, I think the definition of With this change |
I agree, from what the comment in |
When providing a pseudo-submodule for a module already using the `SUBMODULES` mechanism to provide submodules, it is not possible to create a true pseudo-module as submodule (i.e. one without any code on its own), since the build system currently always expects there to be a C file `module_submodule.c`. This removes this requirement.
47543ef
to
744fbc5
Compare
Squashed and triggered CI. |
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.
ACK.
With RIOT-OS#10970 only existing *.c files well be added to SRC when using the SUBMODULES mechanism, so SUBMODULES_NOFORCE (used to filter out non existing source files) is now redundant so remove the usage.
With RIOT-OS#10970 only existing *.c files will be added to SRC when using the SUBMODULES mechanism, so SUBMODULES_NOFORCE (used to filter out non existing source files) is now redundant so remove the usage.
With RIOT-OS#10970 only existing *.c files will be added to SRC when using the SUBMODULES mechanism, so SUBMODULES_NOFORCE (used to filter out non existing source files) is now redundant so remove the usage.
Contribution description
When providing a pseudo-submodule for a module already using the
SUBMODULES
mechanism to provide submodules, it is not possible to create a true pseudo-module as submodule (i.e. one without any code on its own), since the build system currently always expects there to be a C filemodule_submodule.c
.This removes this requirement.
Testing procedure
Build an application with e.g.
USEMODULE += core_foobar
(since anything starting withcore_
is a pseudo-module this implicitly defines a pseudo-module at the moment). Without this PR, the build system will complainWith this PR this error is does not exist anymore.
Issues/PRs references
None (see #10971 for a use-case)