tools/checkpatch: Use gmake on BSD, make otherwise.

* BSD has its own BSD Make that is incompatible with GNU Make.
* When BSD is detected use (gnu) gmake in place of (bsd) make.
* This fixes nxstyle build inside tools/checkpatch.sh.

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
This commit is contained in:
Tomasz 'CeDeROM' CEDRO 2025-03-18 13:17:55 +01:00 committed by Mateusz Szafoni
parent c7d72bc95c
commit 5ad4667a63

View File

@ -21,6 +21,11 @@
TOOLDIR=$(dirname $0)
case "$OSTYPE" in
*bsd*) MAKECMD=gmake;;
*) MAKECMD=make;;
esac
check=check_patch
fail=0
range=0
@ -189,7 +194,7 @@ check_commit() {
check_ranges <<< "$diffs"
}
make -C $TOOLDIR -f Makefile.host nxstyle 1>/dev/null
$MAKECMD -C $TOOLDIR -f Makefile.host nxstyle 1>/dev/null
if [ -z "$1" ]; then
usage