From 445570355f2b63b80aaf91e6adea4ef9709e7d67 Mon Sep 17 00:00:00 2001 From: jperkin Date: Wed, 23 Mar 2016 11:50:01 +0000 Subject: Move handling for PKG_SUPPORTED_OPTIONS and PKG_SUGGESTED_OPTIONS as OPSYSVARS to bsd.options.mk as they affect tests against PKG_OPTIONS before bsd.pkg.mk is parsed. Approved for commit during the freeze by agc@. --- mk/bsd.options.mk | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'mk/bsd.options.mk') diff --git a/mk/bsd.options.mk b/mk/bsd.options.mk index be9552f9440..b6f6571d64c 100644 --- a/mk/bsd.options.mk +++ b/mk/bsd.options.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.options.mk,v 1.71 2013/06/07 00:41:39 obache Exp $ +# $NetBSD: bsd.options.mk,v 1.72 2016/03/23 11:50:01 jperkin Exp $ # # This Makefile fragment provides boilerplate code for standard naming # conventions for handling per-package build options. @@ -178,6 +178,16 @@ PKG_SUPPORTED_OPTIONS?= # none PKG_FAIL_REASON+= "[bsd.options.mk] The package has no options, but includes this file." .endif +# Handle OPSYSVARS here for package options as we need to test PKG_OPTIONS +# in options.mk and cannot wait for lazy evaluation from bsd.pkg.mk. +.for _var_ in PKG_SUPPORTED_OPTIONS PKG_SUGGESTED_OPTIONS +. if defined(${_var_}.${OPSYS}) +${_var_}+= ${${_var_}.${OPSYS}} +. elif defined(${_var_}.*) +${_var_}+= ${${_var_}.*} +. endif +.endfor + # # create map of option to group and add group options to PKG_SUPPORTED_OPTIONS # -- cgit v1.2.3