pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk Display a message with the supported build options ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3b09daea4ce4
branches:  trunk
changeset: 479050:3b09daea4ce4
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed Aug 04 09:36:16 2004 +0000

description:
Display a message with the supported build options at build time.

diffstat:

 mk/bsd.options.mk |  32 +++++++++++++++++++++++++++++++-
 1 files changed, 31 insertions(+), 1 deletions(-)

diffs (43 lines):

diff -r df7bc75bf57d -r 3b09daea4ce4 mk/bsd.options.mk
--- a/mk/bsd.options.mk Wed Aug 04 08:54:57 2004 +0000
+++ b/mk/bsd.options.mk Wed Aug 04 09:36:16 2004 +0000
@@ -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 @@
 # 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



Home | Main Index | Thread Index | Old Index