-
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
sys/Makefile.dep: Some cleanup #16268
Conversation
Let's see if Murdock finds some obvious regressions. |
e16c4b6 seems like a more complicated thing to test, the first commit could be acked right away. |
I split the first commit out as suggested: #16271 |
Seems there is still one conflict @maribu |
@miri64 can you take a quick look? I can verify dependencies afterwards. |
ifneq (,$(filter auto_init_gnrc_netif,$(USEMODULE))) | ||
USEMODULE += gnrc_netif_init_devs | ||
endif |
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.
Why can't this be moved to the new gnrc-specific Makefile? At least a comment should be added to explain it, if there is a reason.
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.
If it would be renamed to auto_init_netif_gnrc
or gnrc_auto_init_netif
it would work. But with gnrc
in the middle, GNRC's Makefile.dep
will not be included (unless by chance another module with a name starting or ending with gnrc is used). I'll add the comment.
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.
Or we just add auto_init%_gnrc%
to the check for GNRC's Makefile.dep
inclusion ;-).
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.
I'm not sure if two wildcards are allowed. I once failed to match something like %foo%
for some reason, while both %foo
and foo%
worked.
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.
Ok, then let's keep it as is for now.
sys/Makefile.dep
Outdated
ifneq (,$(filter gnrc%,$(USEMODULE))) | ||
USEMODULE += gnrc_sock_async | ||
endif |
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.
This might also be movable to the new gnrc-specific Makefile.dep:
ifneq (,$(filter gcoap,$(USEMODULE)))
ifneq (,$(filter gnrc%,$(USEMODULE)))
USEMODULE += gnrc_sock_async
endif
endif
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.
If it would be renamed to
auto_init_netif_gnrc
orgnrc_auto_init_netif
it would work. But withgnrc
in the middle, GNRC'sMakefile.dep
will not be included (unless by chance another module with a name starting or ending with gnrc is used). I'll add the comment.
Could this become a problem here as well?
Apparently, according to Murdock, there is also a problem with alternate implementation module selection for |
@maribu the simplest fix is moving |
An other option would be: diff --git a/sys/Makefile.dep b/sys/Makefile.dep
index 77f44e5ff0..a415deec5f 100644
--- a/sys/Makefile.dep
+++ b/sys/Makefile.dep
@@ -302,6 +302,7 @@ ifneq (,$(filter fuzzing,$(USEMODULE)))
USEMODULE += netdev_test
USEMODULE += gnrc_netif
USEMODULE += gnrc_pktbuf_malloc
+ DISABLE_MODULE += gnrc_pktbuf_static
endif
ifneq (,$(filter netstats_%, $(USEMODULE)))
diff --git a/sys/net/gnrc/Makefile.dep b/sys/net/gnrc/Makefile.dep
index cc0b3d2716..28cb4b9718 100644
--- a/sys/net/gnrc/Makefile.dep
+++ b/sys/net/gnrc/Makefile.dep
@@ -390,18 +390,18 @@ ifneq (,$(filter gnrc,$(USEMODULE)))
endif
endif
-ifneq (,$(filter gnrc_pktbuf, $(USEMODULE)))
- ifeq (,$(filter gnrc_pktbuf_%, $(USEMODULE)))
- USEMODULE += gnrc_pktbuf_static
+ifneq (,$(filter gnrc_pktbuf,$(USEMODULE)))
+ ifeq (,$(filter gnrc_pktbuf_%,$(USEMODULE)))
+ DEFAULT_MODULE += gnrc_pktbuf_static
endif
- ifeq (gnrc_pktbuf_cmd,$(filter gnrc_pktbuf_%, $(USEMODULE)))
+ ifneq (,$(filter gnrc_pktbuf_cmd,$(USEMODULE)))
USEMODULE += gnrc_pktbuf_static
endif
DEFAULT_MODULE += auto_init_gnrc_pktbuf
USEMODULE += gnrc_pkt
endif
-ifneq (,$(filter gnrc_pktbuf_%, $(USEMODULE)))
+ifneq (,$(filter gnrc_pktbuf_cmd, $(USEMODULE)))
USEMODULE += gnrc_pktbuf # make MODULE_GNRC_PKTBUF macro available for all implementations
endif
diff --git a/tests/unittests/tests-pktbuf/Makefile.include b/tests/unittests/tests-pktbuf/Makefile.include
deleted file mode 100644
index dfacccf361..0000000000
--- a/tests/unittests/tests-pktbuf/Makefile.include
+++ /dev/null
@@ -1 +0,0 @@
-USEMODULE += gnrc_pktbuf_static It makes explicit when there is a hard dependency and when it's a default choice. What do you think @miri64 @maribu? (I would nonetheless for this PR just move fuzzing up, and do this in a follow up) |
I would prefer to not use |
I thought of I saw it the other way around,
Which is why I thought it that way.
Because In any case I can bring it up in a follow up to not cloud discussion here. |
Yes, we should focus on moving the GNRC dependencies to their own file first here. Improvements beyond that or Kconfig dependencies we should solve separately. Otherwise, an easy fix suddenly might grow large ;-). |
9eac733
to
adac828
Compare
Rebased and pushed the fuzzing fix, lets see if murdock is happy. |
All is green now. |
Another low hanging fruit before this gets merged is this: Lines 155 to 157 in c0c3a76
The |
Maybe as follow up? Murdock just got happy with the current state. @fjmolinas: I think if you would do the squashing, the shared authorship would remain visible. But I can also do. |
I also think that this is best. It has the additional advantages, that most moves here can be easily identified with the Git parameter |
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.
For the record: I'm mostly fine with this PR. However, I identified a little issue when looking at the change with git diff --color-moved HEAD~3
Yep, it can wait for this PR |
I don't really care for the autorship, you can do it :) |
Other than that I did a diff on master and this branch and there is no difference in |
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.
Other than that I did a diff on master and this branch and there is no difference in
USEMODULE
, only duplicates inFEATURES_%
, see diff.txt
Let not delay and have this diverge, please squash out https://github.com/RIOT-OS/RIOT/pull/16268/files#r619182779 and lets get this in
adac828
to
19d92cb
Compare
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! maybe wait for @miri64 ACK as well...
Nope, still there for a few hours ;-). As I said already: I'm fine with merging this, since my only remaining comment was addressed ;-) |
Contribution description
sys/Makefile.dep
sys/net/gnrc/Makefile.dep
Testing procedure
Tests and applications using GNRC should still generate the same binaries.
Issues/PRs references