Subject: Re: show-options, supported-options-message and describe-options
To: Roland Illig <rillig@NetBSD.org>
From: Dieter Baron <dillo@danbala.tuwien.ac.at>
List: tech-pkg
Date: 09/29/2005 17:15:52
In article <433BF6B8.2090807@NetBSD.org> Roland wrote:
: I find the `show-options' target a little (but only a little) useless. 
: It tells you which options you can select, but it doesn't tell you 
: _where_ to select them. I prefer the `supported-options-message' over it.

  What do you think of the following patch?

  It produces output like this:

$ make show-options
Any of the following general options may be selected:
        esound   Enable support for the Enlightment Sound Daemon.
At most one of the following video options may be selected:
        opengl   Use OpenGL as display library.
        sdl      Use SDL as display library.

These options are enabled by default: 
These options are currently enabled: 

To select options, add them, in /etc/mk.conf, to
        PKG_DEFAULT_OPTIONS (affects all packages), or
        PKG_OPTIONS.xmame (affects this package only).
To deselect options, precede them with ``-''.
See also the section ``Selecting Build Options'' in the pkgsrc guide.


						yours,
						dillo


Index: bsd.options.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.options.mk,v
retrieving revision 1.49
diff -u -r1.49 bsd.options.mk
--- bsd.options.mk	5 Sep 2005 15:24:08 -0000	1.49
+++ bsd.options.mk	29 Sep 2005 15:13:26 -0000
@@ -370,6 +370,12 @@
 	@${ECHO}
 	@${ECHO} "These options are enabled by default: "${PKG_SUGGESTED_OPTIONS:O:Q}
 	@${ECHO} "These options are currently enabled: "${PKG_OPTIONS:O:Q}
+	@${ECHO}
+	@${ECHO} "To select options, add them, in /etc/mk.conf, to"
+	@${ECHO} "        PKG_DEFAULT_OPTIONS (affects all packages), or"
+	@${ECHO} "        "${PKG_OPTIONS_VAR:Q}" (affects this package only)."
+	@${ECHO} "To deselect options, precede them with \`\`-''."
+	@${ECHO} "See also the section \`\`Selecting Build Options'' in the pkgsrc guide."
 .    if defined(PKG_OPTIONS_DEPRECATED_WARNINGS)
 	@${ECHO}
 	@for l in ${PKG_OPTIONS_DEPRECATED_WARNINGS}; \