Skip to content

Commit 80fc99a

Browse files
cederomlupyuen
authored andcommitted
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 <[email protected]>
1 parent 11b6c33 commit 80fc99a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/checkpatch.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121

2222
TOOLDIR=$(dirname $0)
2323

24+
case "$OSTYPE" in
25+
*bsd*) MAKECMD=gmake;;
26+
*) MAKECMD=make;;
27+
esac
28+
2429
check=check_patch
2530
fail=0
2631
range=0
@@ -189,7 +194,7 @@ check_commit() {
189194
check_ranges <<< "$diffs"
190195
}
191196

192-
make -C $TOOLDIR -f Makefile.host nxstyle 1>/dev/null
197+
$MAKECMD -C $TOOLDIR -f Makefile.host nxstyle 1>/dev/null
193198

194199
if [ -z "$1" ]; then
195200
usage

0 commit comments

Comments
 (0)