From owner-freebsd-questions@FreeBSD.ORG Wed Jun 6 12:10:47 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8F440106566B for ; Wed, 6 Jun 2012 12:10:47 +0000 (UTC) (envelope-from tundra@tundraware.com) Received: from ozzie.tundraware.com (ozzie.tundraware.com [75.145.138.73]) by mx1.freebsd.org (Postfix) with ESMTP id 4ED078FC0A for ; Wed, 6 Jun 2012 12:10:47 +0000 (UTC) Received: from [192.168.0.2] (viper.tundraware.com [192.168.0.2]) (authenticated bits=0) by ozzie.tundraware.com (8.14.5/8.14.5) with ESMTP id q56CATkk086096 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Wed, 6 Jun 2012 07:10:29 -0500 (CDT) (envelope-from tundra@tundraware.com) Message-ID: <4FCF48AF.307@tundraware.com> Date: Wed, 06 Jun 2012 07:10:23 -0500 From: Tim Daneliuk User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: FreeBSD Mailing List Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (ozzie.tundraware.com [192.168.0.1]); Wed, 06 Jun 2012 07:10:29 -0500 (CDT) X-TundraWare-MailScanner-Information: Please contact the ISP for more information X-TundraWare-MailScanner-ID: q56CATkk086096 X-TundraWare-MailScanner: Found to be clean X-TundraWare-MailScanner-From: tundra@tundraware.com X-Spam-Status: No Subject: Somewhat OT - A Makefile Question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jun 2012 12:10:47 -0000 Not strictly FBSD, but ... Within a makefile, I need to assign the name of a program as in: FOO = "bar". The problem is that 'bar' may also be know as, say, "bar.sh". Worse still both "bar" and "bar.sh" can exist with one linked to the other. Is there a simple way to determine which form "bar" or "bar.sh" on on a given system *at the time the make is run*? If both exist, I will pick one arbitrarily, I just don't want the detection mechanism to fail when this is the case. For example I don't think this works when both are there: FOO = $(shell `which bar bar.sh) Thanks, -- ---------------------------------------------------------------------------- Tim Daneliuk tundra@tundraware.com PGP Key: http://www.tundraware.com/PGP/