Subject: Re: obsoleting libgetopt
To: Jan Schaumann <jschauma@netbsd.org>
From: Greg Troxel <gdt@ir.bbn.com>
List: tech-pkg
Date: 10/14/2003 11:31:20
Not really trying to make life more complex, to me that this

  .if !exists(/usr/include/getopt.h)
  .  include "../../pkgtools/libnbcompat/buildlink2.mk"
  .endif

seems like an abstraction violation, because the test for the local
getopt checks for one file, whereas really it needs to check if getopt
is there to be found by configure and if it is good enough (e.g. to
work around FooOS's broken getopt).  Alternatively, doing something like

  .include "../../pkgtools/getopt/buildlink2.mk"

or

  .include "../../pkgtools/nbcompat/buildlink2-getopt.mk"

where that file has the test (which could well get more complex over
time) and includes the buildlink2 if needed.
Or, perhaps

  USE_GETOPT=yes
  .include "../../pkgtools/libnbcompat/buildlink2.mk"

and then the nbcompat buildlink2 only builds nbcompat if it needs
getopt.

-- 
        Greg Troxel <gdt@ir.bbn.com>