Subject: Re: need a C++ compiler? (was: CVS commit: pkgsrc)
To: None <tech-pkg@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-pkg
Date: 02/02/2004 23:23:48
On Mon, 02 Feb 2004, Jeremy C. Reed wrote:
> > If you want just the first word from ${CC}, then why not use ${CC:[1]}?
> 
> That is exactly what I want. I looked and looked in make(1) man page and
> could not find that (or any other method to get first word) documented.
> 
> (Can you consider adding that explanation to make man page?)

The :[] modifier is in the make in NetBSD-current, but not in
NetBSD-1.6.x.

I think it's documented adequately (even a little more verbosely than
most of the make(1) documentation), but perhaps the line that says
"index Selects a single word from the value" would benefit from the
addition of "For example, :[1] selects the first word from the value."

I don't have developer access, so I can't make such changes myself.

> > If you don't want to rely on having a sufficiently recent make, and if
> 
> I am using make from 1.6.2 (upcominmg). I assume that you mean that [1]
> feature in new make.

${CC:[1]} won't work in the make that ships with NetBSD-1.6.2.  I think
(as I mentioned some months ago) that pkgsrc should have a framework for
installing a more recent version of make if necessary.

--apb (Alan Barrett)