Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jul 2012 15:59:33 +0000
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        Oliver Fromme <olli@lurza.secnetix.de>
Cc:        freebsd-ports@FreeBSD.org
Subject:   Re: Question about new options framework (regression?)
Message-ID:  <20120725155932.GA13771@ithaqua.etoilebsd.net>
In-Reply-To: <201207251511.q6PFBI6j063853@lurza.secnetix.de>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscribe@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

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

iEYEARECAAYFAlAQF+QACgkQ8kTtMUmk6EzLRgCfTPBajhKCRwKquSpiV9EPa2Qa
GV0AnRSpNiEpYq1TJMNIEB3R2+WrmvfP
=XR+6
-----END PGP SIGNATURE-----
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120725155932.GA13771>