Subject: Re: pkg/20477: defs.Linux.mk assumes sed is in /bin, isn't on
To: Jeremy C. Reed <reed@reedmedia.net>
From: Julio Merino <jmmv@menta.net>
List: netbsd-bugs
Date: 02/24/2003 18:05:17
On Mon, 24 Feb 2003 08:45:20 -0800 (PST)
"Jeremy C. Reed" <reed@reedmedia.net> wrote:

> For the fix in defs.Linux.mk, they should probably just be set to
> command name (no path), just like CMP is set.

Relying on PATH is not good, imho.

So:

1) Use something like:

.if exists(/usr/bin/egrep)
EGREP?=	/usr/bin/egrep
.else
EGREP?=	/bin/egrep
.endif

2) Let the bootstraping process adjust defs.Linux.mk to match the actual
system on the fly.
I have some patches to fix the 'bootstrap' program to automatically
locate sed (and all other tools), so it does not break in linux...
This may be extended to the defs.Linux.mk file too...

Mmm... Linux...

-- 
Julio M. Merino Vidal <jmmv@menta.net>
The NetBSD Project - http://www.NetBSD.org/