Diff of /eclass/flag-o-matic.eclass

Revision 1.13 Revision 1.14
1# Copyright 1999-2003 Gentoo Technologies, Inc. 1# Copyright 1999-2003 Gentoo Technologies, Inc.
3# \$Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.13 2003/03/04 22:07:17 verwilst Exp \$ 3# \$Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.14 2003/03/25 07:07:42 lostlogic Exp \$
4# 4#
5# Author Bart Verwilst <verwilst@gentoo.org> 5# Author Bart Verwilst <verwilst@gentoo.org>
6 6
7ECLASS=flag-o-matic 7ECLASS=flag-o-matic
8INHERITED="\$INHERITED \$ECLASS" 8INHERITED="\$INHERITED \$ECLASS"
78 78
79 for x in \${CFLAGS} 79 for x in \${CFLAGS}
80 do 80 do
81 for y in \${ALLOWED_FLAGS} 81 for y in \${ALLOWED_FLAGS}
82 do 82 do
83 flag=\${x%%=*}
83 if [ "\${x/\${y}}" != "\${x}" ] 84 if [ "\${flag%%\${y}}" = "" ]
84 then 85 then
85 if [ -z "\${NEW_CFLAGS}" ]
86 then
87 NEW_CFLAGS="\${x}"
88 else
89 NEW_CFLAGS="\${NEW_CFLAGS} \${x}" 86 NEW_CFLAGS="\${NEW_CFLAGS} \${x}"
90 fi 87 break
91 fi 88 fi
92 done 89 done
93 done 90 done
94 91
95 for x in \${CXXFLAGS} 92 for x in \${CXXFLAGS}
96 do 93 do
97 for y in \${ALLOWED_FLAGS} 94 for y in \${ALLOWED_FLAGS}
98 do 95 do
96 flag=\${x%%=*}
99 if [ "\${x/\${y}}" != "\${x}" ] 97 if [ "\${flag%%\${y}}" = "" ]
100 then 98 then
101 if [ -z "\${NEW_CXXFLAGS}" ]
102 then
103 NEW_CXXFLAGS="\${x}"
104 else
105 NEW_CXXFLAGS="\${NEW_CXXFLAGS} \${x}" 99 NEW_CXXFLAGS="\${NEW_CXXFLAGS} \${x}"
106 fi 100 break
107 fi 101 fi
108 done 102 done
109 done 103 done
110 104
111 set +f 105 set +f

Legend:
 Removed from v.1.13 changed lines Added in v.1.14