summaryrefslogtreecommitdiff
path: root/mk/bsd.options.mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-11-27 04:50:55 +0000
committerjlam <jlam@pkgsrc.org>2004-11-27 04:50:55 +0000
commitadd5eb0d1dfcc53d0c1491e6644d617d70fe9756 (patch)
treedf915ec1536be0c42d2b25b44c15f8985fa01f69 /mk/bsd.options.mk
parente81fac3412fea581cef58853bc17b8fdc367cc9a (diff)
downloadpkgsrc-add5eb0d1dfcc53d0c1491e6644d617d70fe9756.tar.gz
Output the currently selected options after telling the user which
options are available.
Diffstat (limited to 'mk/bsd.options.mk')
-rw-r--r--mk/bsd.options.mk34
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:"