Subject: Re: new feature for bmake: read-only variables
To: None <tech-pkg@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-pkg
Date: 09/02/2005 10:57:10
On Fri, 02 Sep 2005, Roland Illig wrote:
> >Do you still need the block style when working with targets anyway? You
> >can just use ".READONLY: VAR VAR2" all the time.
>
> http://mail-index.netbsd.org/tech-pkg/2005/08/25/0004.html
>
> Yes, I do. In that example I don't want to duplicate all the
> TOOLS_PLATFORM.* names just for making them read-only.
It's easy to do that another way:
TOOLS_PLATFORM_PAIRS+= cat /bin/cat
TOOLS_PLATFORM_PAIRS+= chgrp /usr/bin/chgrp
TOOLS_PLATFORM_PAIRS+= chmod /bin/chmod
# etc...
.for i j in ${TOOLS_PLATFORM_PAIRS}
TOOLS_PLATFORM.${i} ?= ${j}
.READONLY: ${i}
.endfor
--apb (Alan Barrett)