help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to detect program path?


From: Stephan Beal
Subject: Re: How to detect program path?
Date: Fri, 19 Aug 2011 12:50:08 +0200

On Tue, Aug 16, 2011 at 12:59 PM, Warlich, Christof <
address@hidden> wrote:

> EXECUTABLE:=$(shell find / -name yourExecutable)
>
> But note that this is rather slow and may yield more that one location.
>
>
This one is faster:

########################################################################
# FIND_FILE call()able function:
# $1 = app name
# $2 = optional path
FIND_FILE = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(2)
$(PATH)))))

CC := $(call FIND_FILE,gcc)

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]