Question about new options framework (regression?)

Baptiste Daroussin bapt at FreeBSD.org
Wed Jul 25 15:59:36 UTC 2012


On Wed, Jul 25, 2012 at 05:11:18PM +0200, Oliver Fromme wrote:
> Hi,
> 
> What is the proper way to temporarily change an option on
> the command line or within a script?
> 
> For example, I have a script that builds both dynamic and
> static zsh binaries, without user intervention.  With the
> old options system, the script set "WITH_ZSH_STATIC=true"
> when building the port.  With the new options framework,
> that doesn't work aymore.
> 
> Is there a variable that can be set to override what's read
> from the options file?  If there is none, this feels like a
> regression.
> 
> Best regards
>    Oliver
> 
> -- 
> Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
> Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
> secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
> chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart
> 
> FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd
> 
> One Unix to rule them all, One Resolver to find them,
> One IP to bring them all and in the zone to bind them.
> _______________________________________________
> freebsd-ports at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscribe at freebsd.org"

Examples:

cd /usr/ports/zsh/shells
$ make showconfig
===> The following configuration options are available for zsh-5.0.0:
     DEBUG=off: Install debug symbols
     DOCS=on: Build and install the documentation
     GDBM=off: Enable GDBM support (GPL)
     MAILDIR=on: Enable support for Maildirs in MAIL(PATH)
     MEM=off: Enable zsh-mem options
     MULTIBYTE=on: multibyte character support
     PCRE=off: Use Perl Compatible Regular Expressions
     SECURE_FREE=on: Enable zsh-secure-free
     STATIC=off: Build static executable/libraries
===> Use 'make config' to modify these settings

$ OPTIONS_SET="STATIC" make showconfig
===> The following configuration options are available for zsh-5.0.0:
     DEBUG=off: Install debug symbols
     DOCS=on: Build and install the documentation
     GDBM=off: Enable GDBM support (GPL)
     MAILDIR=on: Enable support for Maildirs in MAIL(PATH)
     MEM=off: Enable zsh-mem options
     MULTIBYTE=on: multibyte character support
     PCRE=off: Use Perl Compatible Regular Expressions
     SECURE_FREE=on: Enable zsh-secure-free
     STATIC=on: Build static executable/libraries
===> Use 'make config' to modify these settings

$ zsh_SET="STATIC" make showconfig
===> The following configuration options are available for zsh-5.0.0:
     DEBUG=off: Install debug symbols
     DOCS=on: Build and install the documentation
     GDBM=off: Enable GDBM support (GPL)
     MAILDIR=on: Enable support for Maildirs in MAIL(PATH)
     MEM=off: Enable zsh-mem options
     MULTIBYTE=on: multibyte character support
     PCRE=off: Use Perl Compatible Regular Expressions
     SECURE_FREE=on: Enable zsh-secure-free
     STATIC=on: Build static executable/libraries
===> Use 'make config' to modify these settings

$ OPTIONS_OVERRIDE="STATIC" make showconfig
 ===> The following configuration options are available for zsh-5.0.0:
     DEBUG=off: Install debug symbols
     DOCS=off: Build and install the documentation
     GDBM=off: Enable GDBM support (GPL)
     MAILDIR=off: Enable support for Maildirs in MAIL(PATH)
     MEM=off: Enable zsh-mem options
     MULTIBYTE=off: multibyte character support
     PCRE=off: Use Perl Compatible Regular Expressions
     SECURE_FREE=off: Enable zsh-secure-free
     STATIC=on: Build static executable/libraries
===> Use 'make config' to modify these settings

OPTIONS_SET and zsh_SET are the two normal way of setting options in make.conf.
OPTIONS_SET being global and zsh_SET being specific.

With both make sure to either not have them in make.conf of have them define with ?= or +=

Be careful that they can be changed by OPTIONS_UNSET and zsh_UNSET from make.conf if any

on the other hand OPTIONS_OVERRIDE will deactivate all options setting what ever the defaults are,
what the saved configuration can be etc.

and run the make command with just the options defined in it activated

regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20120725/97ea29fa/attachment.pgp


More information about the freebsd-ports mailing list