-
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
tools/docheck: fix for non-GNU OSes #12240
Conversation
0b3550c
to
92fd73d
Compare
RIOT required GNU make for its build system. However not all OSes provide GNU make by default, e.g. FreeBSD - on such system `gmake` must be used instead. This PR allows to override the `make` command used.
This fixes an encoding problem in the python helper script generate-changelog.py by setting it to `utf-8`. On FreeBSD the default seems to be `ascii` which resulted in an error.
1611e53
to
b2d6d22
Compare
@cladmi can you have a look on this one please? maybe you have a better way/idea on how to override |
For the python change, I do not think this is currently a reasonable idea. Most of the things in RIOT assume that python is executed within an The issue you mention here seems like the FreeBSD used for testing, is not configured with an "adequate" locale as |
Also, almost everything tells to call 'make' directly, does it not make sense to ask to have a PATH where 'make' is 'gmake' ? There is of course lots of false positive in this output but you get the idea:
|
@cladmi you're right, setting locales to |
thx for pointing that out. |
regarding your second comment: to me it would make sense to use |
So also, documentation, README, examples should mention use 'make' or 'gmake' ? I don't find it worth the effort for a platform that is not used. Windows users also have some setup to do anyway. |
so you mean by setting an alias? |
mhm, makes sense to |
closing, thx @cladmi for discussing this. |
I did not thought about putting an alias, I tend to have my '~/.bin' in the path where I do "script" aliases, but alias should work perfectly. |
yep, using |
When you have a non interactive ssh session, you must manually source the environment with |
Contribution description
This PR provides 2 fixes to run
./dist/tools/doccheck/check.sh
on non-GNU (Linux) OSes such as FreeBSD. First it allows to overwrite themake
command through the environment, which is needed bc FreeBSD provides non-GNU make by default and thus RIOT must usegmake
instead.And second, there was also an encoding error in
generate-changelog.py
bc on FreeBSD if no encoding is set foropen
it defaults toascii
but RIOT usesutf-8
.Testing procedure
Run
make static-test
or./dist/tools/doccheck/check.sh
on your (favourite) OS and it should still work as usual.Issues/PRs references
#3392