summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-11-14 20:29:03 +0000
committerMike Frysinger <vapier@gentoo.org>2011-11-14 20:29:03 +0000
commit33daf795cd05d36b28ea5340c992d8cb2e9cc387 (patch)
treee0db72e4ff28b44f883003aa90c55f1eb16c201c
parentMark USE=nocxx as "do not use anymore". (diff)
downloadgentoo-2-33daf795cd05d36b28ea5340c992d8cb2e9cc387.tar.gz
gentoo-2-33daf795cd05d36b28ea5340c992d8cb2e9cc387.tar.bz2
gentoo-2-33daf795cd05d36b28ea5340c992d8cb2e9cc387.zip
move away from $* to "$@" to pass args sanely
-rw-r--r--eclass/flag-o-matic.eclass25
1 files changed, 12 insertions, 13 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index 7ae62e14d3de..c15220c12536 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2011 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.157 2011/11/11 07:06:25 dirtyepic Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.158 2011/11/14 20:29:03 vapier Exp $
# @ECLASS: flag-o-matic.eclass
# @MAINTAINER:
@@ -143,7 +143,7 @@ filter-lfs-flags() {
# @DESCRIPTION:
# Add extra <flags> to the current CPPFLAGS.
append-cppflags() {
- [[ -z $* ]] && return 0
+ [[ $# -eq 0 ]] && return 0
export CPPFLAGS="${CPPFLAGS} $*"
return 0
}
@@ -153,8 +153,8 @@ append-cppflags() {
# @DESCRIPTION:
# Add extra <flags> to the current CFLAGS.
append-cflags() {
- [[ -z $* ]] && return 0
- export CFLAGS=$(test-flags-CC ${CFLAGS} $*)
+ [[ $# -eq 0 ]] && return 0
+ export CFLAGS=$(test-flags-CC ${CFLAGS} "$@")
return 0
}
@@ -163,8 +163,8 @@ append-cflags() {
# @DESCRIPTION:
# Add extra <flags> to the current CXXFLAGS.
append-cxxflags() {
- [[ -z $* ]] && return 0
- export CXXFLAGS=$(test-flags-CXX ${CXXFLAGS} $*)
+ [[ $# -eq 0 ]] && return 0
+ export CXXFLAGS=$(test-flags-CXX ${CXXFLAGS} "$@")
return 0
}
@@ -173,9 +173,9 @@ append-cxxflags() {
# @DESCRIPTION:
# Add extra <flags> to the current {F,FC}FLAGS.
append-fflags() {
- [[ -z $* ]] && return 0
- export FFLAGS=$(test-flags-F77 ${FFLAGS} $*)
- export FCFLAGS=$(test-flags-FC ${FCFLAGS} $*)
+ [[ $# -eq 0 ]] && return 0
+ export FFLAGS=$(test-flags-F77 ${FFLAGS} "$@")
+ export FCFLAGS=$(test-flags-FC ${FCFLAGS} "$@")
return 0
}
@@ -193,7 +193,7 @@ append-lfs-flags() {
# @DESCRIPTION:
# Add extra <flags> to your current {C,CXX,F,FC}FLAGS.
append-flags() {
- [[ -z $* ]] && return 0
+ [[ $# -eq 0 ]] && return 0
append-cflags "$@"
append-cxxflags "$@"
append-fflags "$@"
@@ -450,7 +450,6 @@ test-flags-PROG() {
[[ -z ${comp} ]] && return 1
- x=""
for x in "$@" ; do
test-flag-${comp} "${x}" && flags="${flags}${flags:+ }${x}"
done
@@ -622,7 +621,7 @@ replace-sparc64-flags() {
# @DESCRIPTION:
# Add extra <libs> to the current LIBS.
append-libs() {
- [[ -z $* ]] && return 0
+ [[ $# -eq 0 ]] && return 0
local flag
for flag in "$@"; do
[[ ${flag} == -l* ]] && flag=${flag#-l}
@@ -637,7 +636,7 @@ append-libs() {
# @DESCRIPTION:
# Add extra <flags> to the current LDFLAGS.
append-ldflags() {
- [[ -z $* ]] && return 0
+ [[ $# -eq 0 ]] && return 0
local flag
for flag in "$@"; do
[[ ${flag} == -l* ]] && \