diff options
author | jlam <jlam> | 2004-08-04 09:36:16 +0000 |
---|---|---|
committer | jlam <jlam> | 2004-08-04 09:36:16 +0000 |
commit | ed6434cf3f8409196d7b7632ce52fd63823867c1 (patch) | |
tree | f3d1335fa4fe5d63878edd606bddfbc64a4b99e3 | |
parent | ddbfefe864b98c4c7862a4e3ff63ec6865394f95 (diff) | |
download | pkgsrc-ed6434cf3f8409196d7b7632ce52fd63823867c1.tar.gz |
Display a message with the supported build options at build time.
-rw-r--r-- | mk/bsd.options.mk | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/mk/bsd.options.mk b/mk/bsd.options.mk index 3ddc67f6272..06bd60dc820 100644 --- a/mk/bsd.options.mk +++ b/mk/bsd.options.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.options.mk,v 1.1 2004/07/30 20:59:08 jlam Exp $ +# $NetBSD: bsd.options.mk,v 1.2 2004/08/04 09:36:16 jlam Exp $ # # This Makefile fragment provides boilerplate code for standard naming # conventions for handling per-package build options. @@ -162,3 +162,33 @@ PKG_FAIL_REASON+= "\"${_opt_}\" is not a supported build option." # options using "pkg_info -Q PKG_OPTIONS <pkg>". # BUILD_DEFS+= PKG_OPTIONS + +.PHONY: pre-extract supported-options-message +pre-extract: supported-options-message +.if !defined(PKG_SUPPORTED_OPTIONS) +supported-options-message: # do nothing +.else +supported-options-message: ${WRKDIR}/.som_done +${WRKDIR}/.som_done: ${WRKDIR} +. if !empty(PKG_SUPPORTED_OPTIONS) + @${ECHO} "==========================================================================" + @${ECHO} "The supported build options for this package are:" + @${ECHO} "" + @${ECHO} " ${PKG_SUPPORTED_OPTIONS}" + @${ECHO} "" + @${ECHO} "You can select which build options to use by setting the following" + @${ECHO} "variables. Their curent value is shown:" + @${ECHO} "" +. for _var_ in ${PKG_OPTIONS_VAR} +. if !defined(${_var_}) + @${ECHO} " ${_var_} (not defined)" +. else + @${ECHO} " ${_var_} = ${${_var_}}" +. endif +. endfor +. undef _var_ + @${ECHO} "" + @${ECHO} "==========================================================================" + @${TOUCH} ${.TARGET} +. endif +.endif |