Subject: Re: ../../devel/libgetopt/buildlink3.mk and getopt.h
To: None <tech-pkg@netbsd.org>
From: Jan Schaumann <jschauma@netmeister.org>
List: tech-pkg
Date: 04/25/2005 14:42:39
--gKMricLos+KVdGMg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Georg Schwarz <georg.schwarz@freenet.de> wrote:
> > Also look at devel/libgetopt/builtin.mk
>=20
> Thanks. That's where the problem lies. It should get the follwing patch:
>=20
> --- builtin.mk.orig     Mon Apr 25 19:36:33 2005
> +++ builtin.mk  Mon Apr 25 19:38:04 2005
> @@ -2,7 +2,7 @@
> =20
>  .if !defined(IS_BUILTIN.getopt)
>  IS_BUILTIN.getopt=3D     no
> -.  if exists(/usr/include/getopt.h)
> +.  if exists(/usr/include/getopt.h) && empty(LOWER_OPSYS:Mirix5*)
>  IS_BUILTIN.getopt=3D     yes
>  .  endif
>  .endif # IS_BUILTIN.getopt
>=20
>=20
> (cf. devel/libgetopt/Makefile)
> Any objections agains committing this?

I'm not entirely happy with the general approach of sprinkling very
operating system (and even OS-version) specific tests around.
This simply doesn't scale well and we may at some point end up with=20

if exists(/usr/include/getopt.h) && empty(LOWER_OPSYS:Mirix5*) &&
emtpy(OPSYS:MsomeOtherOS1) && (empty(OPSYS:MyetAnotherOne) &&
!empty(OPSYS:MyetAnotherOne3))

etc. etc.

Is there no other, more general way to test for the specific capability
required and provided?

-Jan

--=20
"The last time anybody made a list of the top hundred character
attributes of New Yorkers, common sense snuck in at number 79."

--gKMricLos+KVdGMg
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFCbToffFtkr68iakwRAq42AKCYS0FUaPtvxihPWz94R3pdDTkUxgCgrj4P
GP1UiZcB5Zwgdb745wyNzuE=
=t+C/
-----END PGP SIGNATURE-----

--gKMricLos+KVdGMg--