cornelisnetworks / opa-psm2

Other
37 stars 29 forks source link

Remove bashisms from Makefile #56

Closed bsmith94 closed 3 years ago

bsmith94 commented 4 years ago

Change double-bracket test to single-bracket. Change double-equals operator to equals.

mwheinz commented 4 years ago

Why do you feel this is needed?

That is, I haven't seen any environments that still use sh, and this has been in the code for several years.

bsmith94 commented 4 years ago

That is, I haven't seen any environments that still use sh, and this has been in the code for several years.

The default shell for make is /bin/sh. This an issue on debian, where the bashisms cause a non-fatal build error, specified in the original post.

https://www.gnu.org/software/make/manual/html_node/Choosing-the-Shell.html

mwheinz commented 4 years ago

Okay. Thanks for explaining - and for contributing.

I'm not sure this will make the next official release, but I'll try to get it in.

bsmith94 commented 4 years ago

FWIW, the bashisms work on RHEL because /bin/sh is a symlink to /bin/bash and it accepts bashisms. Debian uses dash as the replacement for /bin/sh.

bsmith94 commented 4 years ago

Excellent. I have it fixed in the debian package. Forwarding as a courtesy. Thanks.

mwheinz commented 3 years ago

This has been folded into our internal builds of PSM2 and will be part of our next github release. Thanks, @bsmith94.