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>
References:  <201207251511.q6PFBI6j063853@lurza.secnetix.de>

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

--PNTmBPCT7hxwcZjr
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Jul 25, 2012 at 05:11:18PM +0200, Oliver Fromme wrote:
> Hi,
>=20
> What is the proper way to temporarily change an option on
> the command line or within a script?
>=20
> 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=3Dtrue"
> when building the port.  With the new options framework,
> that doesn't work aymore.
>=20
> 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.
>=20
> Best regards
>    Oliver
>=20
> --=20
> Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
> Handelsregister: Registergericht Muenchen, HRA 74606,  Gesch=E4ftsfuehrun=
g:
> secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht M=FC=
n-
> chen, HRB 125758,  Gesch=E4ftsf=FChrer: Maik Bachmann, Olaf Erb, Ralf Geb=
hart
>=20
> FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd
>=20
> 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
=3D=3D=3D> The following configuration options are available for zsh-5.0.0:
     DEBUG=3Doff: Install debug symbols
     DOCS=3Don: Build and install the documentation
     GDBM=3Doff: Enable GDBM support (GPL)
     MAILDIR=3Don: Enable support for Maildirs in MAIL(PATH)
     MEM=3Doff: Enable zsh-mem options
     MULTIBYTE=3Don: multibyte character support
     PCRE=3Doff: Use Perl Compatible Regular Expressions
     SECURE_FREE=3Don: Enable zsh-secure-free
     STATIC=3Doff: Build static executable/libraries
=3D=3D=3D> Use 'make config' to modify these settings

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

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

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

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

With both make sure to either not have them in make.conf of have them defin=
e with ?=3D or +=3D

Be careful that they can be changed by OPTIONS_UNSET and zsh_UNSET from mak=
e.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

--PNTmBPCT7hxwcZjr
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (FreeBSD)

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

--PNTmBPCT7hxwcZjr--



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