-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
For Bash scripts in util/
(build-gnu.sh
, run-gnu-test.sh
, build-code_coverage.sh
...), commands for make
and readlink
are not compatible with BSD OS (FreeBSD, NetBSD and OpenBSD).
- GNU
make
, not compatible withmake
on BSD readlink
uses-m
flag : not present forreadlink
on BSD, only in GNU coreutilsreadlink
On BSD:
- GNU
make
could be installed via package (gmake
on OpenBSD) - GNU coreutils (
readlink
) is available incoreutils
package on OpenBSD
Proposal to modify Bash scripts to be compatible with BSD OS and Linux (with GNU coreutils installed by default)
- checks OS and defines
MAKE
/READLINK
variables
# Check OS to use GNU coreutils and make: specific version on *BSD
case "$OSTYPE" in
*bsd*)
MAKE="gmake"
READLINK="greadlink"
;;
*)
MAKE="make"
READLINK="readlink"
;;
esac
- replace
make
by${MAKE}
- replace
readlink
by${READLINK}
Metadata
Metadata
Assignees
Labels
No labels