Subject: Re: Per-target specific vars in mk files
To: Julio M. Merino Vidal <email@example.com>
From: Luke Mewburn <lukem@NetBSD.org>
Date: 07/22/2007 11:51:51
Content-Type: text/plain; charset=us-ascii
On Thu, Jul 19, 2007 at 05:21:05PM +0200, Julio M. Merino Vidal wrote:
| Several of our bsd.*.mk files support specifying per-target specific =
| variables. What I'm referring to is the following:
| FILES=3D foo bar
| FILESDIR_foo=3D ...
| FILESDIR_bar=3D ...
| PROG=3D foo
| COPTS.foo=3D ...
| CPPFLAGS.foo=3D ...
| Some files currently use a _ separator while others use ., as shown =20
| Is it there any rationale behind this difference?
I added support for COPTS.<name> to <bsd.sys.mk> in rev 1.93 (2003/07/22)
I don't recall why we switched from `_' to `.' as the separator.
I know that sh(1) variables can't have `.' in them, whereas make(1)
supports it, so using `.' prevents sh from being used to set
environment variables that make(1) will inherit.
| If there isn't, do you think it's worth to sweep these to unify them
| all to use the same separator?
That would require a rewrite of Makefiles not in the tree
(i.e used by users / third-parties) that use the existing semantics.
Besides the asthetics of consistency (which are not a bad thing per se),
is there any reason to change what we currently have?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (NetBSD)
-----END PGP SIGNATURE-----