Subject: Re: on the topic of bmake
To: George Georgalis <george@galis.org>
From: Tobias Nygren <tnn@NetBSD.org>
List: pkgsrc-users
Date: 12/11/2007 22:20:56
On Tue, 11 Dec 2007 12:11:09 -0500
George Georgalis <george@galis.org> wrote:

> Every so often I use make when I should use bmake...
> 
> Is there any particular reason the bootstrap files
> don't determine make compatibility and exec bmake $@
> as needed?
> 
> // George

Yes, because e.g. category/pkg/Makefile might contain statements
that gmake doesn't understand, causing it to bail out before including
any infrastructure stuff that could potentially do autodetection.

You could put something like the following in ~/.profile to get
similar functionality:

--8<----8<--
make() {
if pwd | grep 'pkgsrc/[^/]*/[^/]*$' > /dev/null
then
/usr/pkg/bin/bmake $@
else
/usr/bin/make $@
fi
}
--8<----8<--

Kind regards,
-Tobias