FS#6499 - fix make/gmake detection in Mac OS X/Darwin

Attached to Project: Rockbox
Opened by Lenny Koepsell (lenny) - Thursday, 04 January 2007, 07:32 GMT
Last edited by Barry Wardell (barrywardell) - Monday, 13 August 2007, 00:10 GMT
Task Type Patches
Category Build environment
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


A commit on 22 Nov 09:07 added detection for gmake so it can be used if available.

I assume on standard *nix distros the command "which" should return nothing if the program is not found. However, in mac os x (darwin) "which" returns with an error message when a program is not found.

$ which gmake
no gmake in /bin /sbin /usr/bin /usr/sbin

This creates problems for this if statement:

if [ -n "`which gmake`" ]; then

I have added a subsequent if statement which seems to fix the problem.

Let me know how I did! (first patch)
This task depends upon

Closed by  Barry Wardell (barrywardell)
Monday, 13 August 2007, 00:10 GMT
Reason for closing:  Accepted
Additional comments about closing:  Thanks.
Comment by Lenny Koepsell (lenny) - Friday, 05 January 2007, 08:35 GMT
I suspect this behavior (the presence of an error message from "which") is not Darwin specific. Perhaps a BSD thing?
Comment by Magnus Lindström (mlind) - Tuesday, 09 January 2007, 21:55 GMT
Works great for me!