Subject: PLIST_SRC vs PKG_OPTIONS
To: None <tech-pkg@netbsd.org>
From: Jeff Rizzo <riz@tastylime.net>
List: tech-pkg
Date: 03/16/2005 09:14:41
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig2F555A1AA0B7A5D6BC383440
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit

I'm trying to fix up some things in the Asterisk package I've been
working on, so that I can bring it in once the freeze is over, but I'm
bumping my head against something I can't figure out... getting the
PLIST right when an option is enabled.

I've got a separate options.mk, which is .included in the main
Makefile.  Here it is:

# $NetBSD$

PKG_OPTIONS_VAR=        PKG_OPTIONS.asterisk
PKG_SUPPORTED_OPTIONS=  zaptel
.include "../../mk/bsd.options.mk"

# Can't use the default PLIST_SRC handling, since we may need to
# add PLIST.zaptel

PLIST_SRC=              ${PKGDIR}/PLIST.common
.  if exists(${PKGDIR}/PLIST.${OPSYS})
PLIST_SRC+=             ${PKGDIR}/PLIST.${OPSYS}
.  endif

.if !empty(PKG_OPTIONS:Mzaptel)
# zaptel only supported under NetBSD at the moment
.  include "../../wip/zaptel-netbsd/buildlink3.mk"
PLIST_SRC+=             ${PKGDIR}/PLIST.zaptel
.endif

PLIST_SRC+=             ${PKGDIR}/PLIST.common_end


Everything seems to work OK when PKG_OPTIONS.asterisk=zaptel *except*
that the PLIST doesn't include the stuff from PLIST.zaptel.  It contains
all the other bits (PLIST.common, PLIST.NetBSD, PLIST.common_end),
though, so I'm confused.  :/   Also, if I add a "foo:" target to the
Makefile that just echos ${PLIST_SRC} and does a cat ${PLIST_SRC}, it
seems to work OK...

Clearly, I'm missing something.  Anyone have an idea _what_? 

Thanks,
+j


--------------enig2F555A1AA0B7A5D6BC383440
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (Darwin)

iQCVAwUBQjhphbOuUtxCgar5AQJCjAP+Mw3hrzw4BGae/8XrEIPHk6AR2h2rQk0N
obrWx51l7eqBaBhdudsG6mVfuntuH/B7CPFH6Cdrmt3qMDdbW5eewnDn26kvr/ba
qZaUxjGoxLvPdFgn6FqojlzPAunVWbGHODdRtBtjH8wA0mNnfeT5mkwrYdQ4EAhq
9jjLzfrqqBU=
=gz8G
-----END PGP SIGNATURE-----

--------------enig2F555A1AA0B7A5D6BC383440--