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
Makefile.include: require make version 4. #10554
Conversation
Makefile.include
Outdated
@@ -1,3 +1,10 @@ | |||
MATCH_MAKE_VERSION = 5.% |
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.
PLEASE NOTE The version here is 5 just to show what happens if you have an old version, so it can be tested.
Without the test commit, the required version is 4.
Could you elaborate on that? |
Ideally we would require the same version as in RIOTDOCKER. The reason is that we, build system maintainers, can easily test and develop on RIOTDOCKER, but not on OSX, so each time I have to do a fix on a makefile I have to work blind. Important changes since make 3.81: Version 3.82 (full list here)
Version 4.0 (full list here)
Also, on one of this versions, a bug was fixed regarding rules ending in |
I'm sorry about the triplicate comments, github went bananas. |
What is the status with this? Mac users, is it tool burdensome to install make 4? (it is a sincere question, I've never used a mac in my life.) |
What's up with this? Should we merge and then wait for the bug reports to come from Mac users? If I break the build that would surely get people interested. |
using Home-brew you get |
using Home-Brew or MacPorts, which most developers do anyway, its straight forward and easy. But still we should have proper versions checks and warnings. for (all) tools we use and require. So this PR makes perfect sense to me for now - because ideally such dependency checks should be done in a system discovery (or bootstrap) step before the compile step; like As we do not have that (yet), we should proceed with this PR. |
Is it necessary to replace system make?
Agreed, except checking for the make version is a special case because:
|
No, actually not - just prepend to PATH to find the newer version first
yeah, what I meant was more like: not do the check over and over again but rather have something like |
Ok, I was asking because I have no idea about MacOS and your comment made me worry that the required setup was too invasive.
yeah, yeah, I know. You cannot even imagine how often that topic comes up in conversations with @cladmi . Removing exports (WIP) should make the situation more tolerable, but it is not a full solution. Anyways, I'm wandering off topic. Is everybody cool with this change? |
I would like to update the phrasing on the error message. Could you put it as a As currently, we do not rely on stem target specific variables with multiple definitions, and no directories targets is currently in. We are thinking about the last one but could be done with For the canned recipes, using instead the I did not know |
Sure. It is also a good opportunity to start using deprecation warnings (and thus set a precedent). |
I changed the message, see if you like it. In the meantime I disabled the CI to save a bit of CO2. |
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.
lets move this forward: (re)tested on MacOS as described before using GNU make installed via HomeBrew. ACK!
From my side: please squash and drop test commit.
Old versions of GNU Make (especially on OSX) are a pain to deal with. This commit introduces a warning when such an old version is found. The goal is the future the warning will be turned into an error. 2020.01 is set as the date we remove support. Complying with version 4.x is easy on OSX by using homebrew, and on Linux, even Debian stable has the required version.
edc3c93
to
9289fee
Compare
@smlng done. sorry for the delay. |
Contribution description
Old versions of GNU Make (especially on OSX) are a pain to deal with. This commit introduces a warning when such an old version is found. The goal is that in the future the warning will be turned into an error. For that I can open a PR, which we don't merge, and is tagged for a future release.
Complying with version 4.x is easy on OSX by using homebrew, and on Linux, even Debian stable has the required version.
Testing procedure
The test PR allows you to see what happens when you have an old version (it sets the version to 5, which does not exist at the moment.) Just go to any example and type
make
.If you do the same without the test PR no warning is emitted.
Issues/PRs references
The old version of make in vanilla OSX is blocking the introduction of rules to make directories.
Old make does not support
?=
in canned recipes.