Subject: Re: Per-target specific vars in mk files
To: Julio M. Merino Vidal <jmmv84@gmail.com>
From: Luke Mewburn <lukem@NetBSD.org>
List: tech-userlevel
Date: 07/22/2007 11:51:51
--zqjkMoGlbUJ91oFe
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Jul 19, 2007 at 05:21:05PM +0200, Julio M. Merino Vidal wrote:
  | Hello,
  |=20
  | Several of our bsd.*.mk files support specifying per-target specific =
=20
  | variables.  What I'm referring to is the following:
  |=20
  | FILES=3D foo bar
  | FILESDIR_foo=3D ...
  | FILESDIR_bar=3D ...
  |=20
  | PROG=3D foo
  | COPTS.foo=3D ...
  | CPPFLAGS.foo=3D ...
  |=20
  | Some files currently use a _ separator while others use ., as shown =20
  | above.
  | 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?


cheers,
Luke.

--zqjkMoGlbUJ91oFe
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (NetBSD)

iD8DBQFGorg3pBhtmn8zJHIRAo+LAKCPWzAbuWQ+C5eURJvTTjtJCLtEcACfYO0z
u3GhbG2at4pnXdGyvExy4ps=
=aqED
-----END PGP SIGNATURE-----

--zqjkMoGlbUJ91oFe--