diff options
Diffstat (limited to 'mk/plist')
-rw-r--r-- | mk/plist/plist.mk | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/mk/plist/plist.mk b/mk/plist/plist.mk index c64e609a85c..8949b7a6b8a 100644 --- a/mk/plist/plist.mk +++ b/mk/plist/plist.mk @@ -1,4 +1,4 @@ -# $NetBSD: plist.mk,v 1.36 2007/10/31 21:09:03 rillig Exp $ +# $NetBSD: plist.mk,v 1.37 2008/04/08 20:52:15 jlam Exp $ # # This Makefile fragment handles the creation of PLISTs for use by # pkg_create(8). @@ -10,6 +10,13 @@ # are listed in files. Valid values are "dynamic" and "static", # and the default value is "static". # +# PLIST_VARS is the list of names corresponding to automatic variables +# generated by plist.mk to simplify having conditionally-present +# entries in the PLIST. If "var" is listed in PLIST_VARS, then the +# automatic variable is named PLIST.var. If PLIST.var is defined, +# then in the PLIST generation, the ${PLIST.var} symbol is replaced +# with the empty string, or "@comment " otherwise. +# # PLIST_SRC is the list of source files from which the PLIST file of # the binary package will be generated. By default, its value is # constructed from the PLIST.* files within the package directory, @@ -32,9 +39,11 @@ _VARGROUPS+= plist _USER_VARS.plist= # none -_PKG_VARS.plist= PLIST_SUBST PLIST_SRC GENERATE_PLIST +_PKG_VARS.plist= PLIST_SUBST PLIST_VARS PLIST_SRC GENERATE_PLIST _SYS_VARS.plist= PLIST_TYPE PLIST +PLIST_VARS?= # empty + .if ${PKG_INSTALLATION_TYPE} == "pkgviews" PLIST_TYPE?= dynamic .endif @@ -153,6 +162,10 @@ PLIST_SUBST+= OPSYS=${OPSYS:Q} \ TRUE=${TRUE:Q} \ PKGMANDIR=${PKGMANDIR:Q} +.for _var_ in ${PLIST_VARS} +PLIST_SUBST+= ${PLIST.${_var_}:DPLIST.${_var_}=:UPLIST.${_var_}="@comment "} +.endfor + # Pass the PLIST_SUBST substitutions to the subst.awk script by prepending # PLIST_" to all of the variable names and adding them into the environment. # |