Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Donnie Berkholz <dberkholz@g.o>
Subject: Re: New eclass: scons.eclass
Date: Wed, 6 Oct 2010 12:52:33 -0500
On 20:57 Tue 05 Oct     , Michał Górny wrote:
> # @FUNCTION: use_scons
> # @USAGE: <use-flag> [var-name] [var-opt-true] [var-opt-false]
> # @DESCRIPTION:
> # Output an SCons parameter with value depending on the USE flag state.
> # If the USE flag is set, output <var-name>=<var-opt-true>; otherwise
> # <var-name>=<var-opt-false>.
> #
> # If <var-name> is not set, <use-flag> will be used instead.
> # If <var-opt-true> or <var-opt-false> is unset, USE_SCONS_TRUE
> # or USE_SCONS_FALSE will be used instead.
> use_scons() {
> 	local flag=${1}
> 	local varname=${2:-${flag#!}}

Could you explain how this works to me, please? It seems like you're 
reversing the logic when people use the !flag syntax.

> 	local vartrue=${3:-${USE_SCONS_TRUE}}
> 	local varfalse=${4:-${USE_SCONS_FALSE}}

-- 
Thanks,
Donnie

Donnie Berkholz
Sr. Developer, Gentoo Linux
Blog: http://dberkholz.wordpress.com
Attachment:
pgpkJrrEKfzGE.pgp (PGP signature)
Replies:
Re: New eclass: scons.eclass
-- Michał Górny
References:
New eclass: scons.eclass
-- Michał Górny
Re: New eclass: scons.eclass
-- Michał Górny
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: New eclass: scons.eclass
Next by thread:
Re: New eclass: scons.eclass
Previous by date:
Re: app-portage/conf-update: new maintainer needed
Next by date:
Re: Revbumped php-ext-* eclasses


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.