diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-11-18 08:29:17 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-11-18 08:29:17 +0000 |
commit | b1fcbeafc35701367cb84c4efce3b46426343cb1 (patch) | |
tree | 5c5fc977777ec0719ac5fe6bd72c8ccd34b106d2 /eclass | |
parent | Bump dataenc to 0.14.0.4 (diff) | |
download | gentoo-2-b1fcbeafc35701367cb84c4efce3b46426343cb1.tar.gz gentoo-2-b1fcbeafc35701367cb84c4efce3b46426343cb1.tar.bz2 gentoo-2-b1fcbeafc35701367cb84c4efce3b46426343cb1.zip |
test-flags-PROG: use arrays to simplify code a bit
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/flag-o-matic.eclass | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index f5f7720674d8..5e6af23468fc 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.182 2012/11/18 08:27:00 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.183 2012/11/18 08:29:17 vapier Exp $ # @ECLASS: flag-o-matic.eclass # @MAINTAINER: @@ -422,21 +422,21 @@ test-flag-FC() { test-flag-PROG "FC" f95 "$1"; } test-flags-PROG() { local comp=$1 - local flags + local flags=() local x shift [[ -z ${comp} ]] && return 1 - for x in "$@" ; do - test-flag-${comp} "${x}" && flags="${flags}${flags:+ }${x}" + for x ; do + test-flag-${comp} "${x}" && flags+=( "${x}" ) done - echo "${flags}" + echo "${flags[*]}" # Just bail if we dont have any flags - [[ -n ${flags} ]] + [[ ${#flags[@]} -gt 0 ]] } # @FUNCTION: test-flags-CC |