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
commit7b427f67e1fdbbd42f37faa714dd2453c0b4aebb (patch)
tree646f36b19e0e3301c166e92916b620898eabafa8 /eclass/flag-o-matic.eclass
parentMark USE=nocxx as "do not use anymore". (diff)
downloadhistorical-7b427f67e1fdbbd42f37faa714dd2453c0b4aebb.tar.gz
historical-7b427f67e1fdbbd42f37faa714dd2453c0b4aebb.tar.bz2
historical-7b427f67e1fdbbd42f37faa714dd2453c0b4aebb.zip
move away from $* to "$@" to pass args sanely
Diffstat (limited to 'eclass/flag-o-matic.eclass')
-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* ]] && \