diff options
author | jlam <jlam> | 2004-11-27 04:50:55 +0000 |
---|---|---|
committer | jlam <jlam> | 2004-11-27 04:50:55 +0000 |
commit | c9f3760dfce8c2c48af2db222ff6bcf9b0c365e8 (patch) | |
tree | df915ec1536be0c42d2b25b44c15f8985fa01f69 /mk | |
parent | 16cf24b6ec031c2906e03316594d0edd2712ab36 (diff) | |
download | pkgsrc-c9f3760dfce8c2c48af2db222ff6bcf9b0c365e8.tar.gz |
Output the currently selected options after telling the user which
options are available.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.options.mk | 34 |
1 files changed, 21 insertions, 13 deletions
diff --git a/mk/bsd.options.mk b/mk/bsd.options.mk index acd0fdfb78c..1ea9189fccd 100644 --- a/mk/bsd.options.mk +++ b/mk/bsd.options.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.options.mk,v 1.9 2004/09/15 03:59:17 jlam Exp $ +# $NetBSD: bsd.options.mk,v 1.10 2004/11/27 04:50:55 jlam Exp $ # # This Makefile fragment provides boilerplate code for standard naming # conventions for handling per-package build options. @@ -160,18 +160,7 @@ PKG_FAIL_REASON+= "\"${_opt_}\" is not a supported build option." . endif .endfor -.PHONY: pre-install-depends supported-options-message -pre-install-depends: 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}" | ${XARGS} -n 1 | ${SORT} | \ +_PKG_OPTIONS_WORDWRAP_FILTER= \ ${AWK} ' \ BEGIN { printwidth = 40; line = "" } \ { \ @@ -186,6 +175,25 @@ ${WRKDIR}/.som_done: ${WRKDIR} } \ END { if (length(line) > 0) print " "line } \ ' + +.PHONY: pre-install-depends supported-options-message +pre-install-depends: 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}" | ${XARGS} -n 1 | ${SORT} | \ + ${_PKG_OPTIONS_WORDWRAP_FILTER} + @${ECHO} "" + @${ECHO} "The currently selected options are:" + @${ECHO} "" + @${ECHO} "${PKG_OPTIONS}" | ${XARGS} -n 1 | ${SORT} | \ + ${_PKG_OPTIONS_WORDWRAP_FILTER} @${ECHO} "" @${ECHO} "You can select which build options to use by setting the following" @${ECHO} "variables. Their current value is shown:" |