1 |
vapier 11/11/14 20:29:03 |
2 |
|
3 |
Modified: flag-o-matic.eclass |
4 |
Log: |
5 |
move away from $* to "$@" to pass args sanely |
6 |
|
7 |
Revision Changes Path |
8 |
1.158 eclass/flag-o-matic.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.158&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?rev=1.158&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/flag-o-matic.eclass?r1=1.157&r2=1.158 |
13 |
|
14 |
Index: flag-o-matic.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v |
17 |
retrieving revision 1.157 |
18 |
retrieving revision 1.158 |
19 |
diff -u -r1.157 -r1.158 |
20 |
--- flag-o-matic.eclass 11 Nov 2011 07:06:25 -0000 1.157 |
21 |
+++ flag-o-matic.eclass 14 Nov 2011 20:29:03 -0000 1.158 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2011 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.157 2011/11/11 07:06:25 dirtyepic Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.158 2011/11/14 20:29:03 vapier Exp $ |
27 |
|
28 |
# @ECLASS: flag-o-matic.eclass |
29 |
# @MAINTAINER: |
30 |
@@ -143,7 +143,7 @@ |
31 |
# @DESCRIPTION: |
32 |
# Add extra <flags> to the current CPPFLAGS. |
33 |
append-cppflags() { |
34 |
- [[ -z $* ]] && return 0 |
35 |
+ [[ $# -eq 0 ]] && return 0 |
36 |
export CPPFLAGS="${CPPFLAGS} $*" |
37 |
return 0 |
38 |
} |
39 |
@@ -153,8 +153,8 @@ |
40 |
# @DESCRIPTION: |
41 |
# Add extra <flags> to the current CFLAGS. |
42 |
append-cflags() { |
43 |
- [[ -z $* ]] && return 0 |
44 |
- export CFLAGS=$(test-flags-CC ${CFLAGS} $*) |
45 |
+ [[ $# -eq 0 ]] && return 0 |
46 |
+ export CFLAGS=$(test-flags-CC ${CFLAGS} "$@") |
47 |
return 0 |
48 |
} |
49 |
|
50 |
@@ -163,8 +163,8 @@ |
51 |
# @DESCRIPTION: |
52 |
# Add extra <flags> to the current CXXFLAGS. |
53 |
append-cxxflags() { |
54 |
- [[ -z $* ]] && return 0 |
55 |
- export CXXFLAGS=$(test-flags-CXX ${CXXFLAGS} $*) |
56 |
+ [[ $# -eq 0 ]] && return 0 |
57 |
+ export CXXFLAGS=$(test-flags-CXX ${CXXFLAGS} "$@") |
58 |
return 0 |
59 |
} |
60 |
|
61 |
@@ -173,9 +173,9 @@ |
62 |
# @DESCRIPTION: |
63 |
# Add extra <flags> to the current {F,FC}FLAGS. |
64 |
append-fflags() { |
65 |
- [[ -z $* ]] && return 0 |
66 |
- export FFLAGS=$(test-flags-F77 ${FFLAGS} $*) |
67 |
- export FCFLAGS=$(test-flags-FC ${FCFLAGS} $*) |
68 |
+ [[ $# -eq 0 ]] && return 0 |
69 |
+ export FFLAGS=$(test-flags-F77 ${FFLAGS} "$@") |
70 |
+ export FCFLAGS=$(test-flags-FC ${FCFLAGS} "$@") |
71 |
return 0 |
72 |
} |
73 |
|
74 |
@@ -193,7 +193,7 @@ |
75 |
# @DESCRIPTION: |
76 |
# Add extra <flags> to your current {C,CXX,F,FC}FLAGS. |
77 |
append-flags() { |
78 |
- [[ -z $* ]] && return 0 |
79 |
+ [[ $# -eq 0 ]] && return 0 |
80 |
append-cflags "$@" |
81 |
append-cxxflags "$@" |
82 |
append-fflags "$@" |
83 |
@@ -450,7 +450,6 @@ |
84 |
|
85 |
[[ -z ${comp} ]] && return 1 |
86 |
|
87 |
- x="" |
88 |
for x in "$@" ; do |
89 |
test-flag-${comp} "${x}" && flags="${flags}${flags:+ }${x}" |
90 |
done |
91 |
@@ -622,7 +621,7 @@ |
92 |
# @DESCRIPTION: |
93 |
# Add extra <libs> to the current LIBS. |
94 |
append-libs() { |
95 |
- [[ -z $* ]] && return 0 |
96 |
+ [[ $# -eq 0 ]] && return 0 |
97 |
local flag |
98 |
for flag in "$@"; do |
99 |
[[ ${flag} == -l* ]] && flag=${flag#-l} |
100 |
@@ -637,7 +636,7 @@ |
101 |
# @DESCRIPTION: |
102 |
# Add extra <flags> to the current LDFLAGS. |
103 |
append-ldflags() { |
104 |
- [[ -z $* ]] && return 0 |
105 |
+ [[ $# -eq 0 ]] && return 0 |
106 |
local flag |
107 |
for flag in "$@"; do |
108 |
[[ ${flag} == -l* ]] && \ |