/[gentoo-x86]/eclass/flag-o-matic.eclass
Gentoo

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.3
1# Copyright 1999-2002 Gentoo Technologies, Inc. 1# Copyright 1999-2002 Gentoo Technologies, Inc.
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# Author Bart Verwilst <verwilst@gentoo.org> 3# Author Bart Verwilst <verwilst@gentoo.org>
4# /space/gentoo/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass 4# /space/gentoo/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass
5ECLASS=flag-o-matic 5ECLASS=flag-o-matic
6
7#
8#### filter-flags <flag> ####
9# Remove particular flags from C[XX]FLAGS
10#
11#### append-flags <flag> ####
12# Add extra flags to your current C[XX]FLAGS
13#
14#### change-flags <orig.flag> <new.flag> ###
15# Replace a flag by another one
16#
17
6 18
7filter-flags () { 19filter-flags () {
8 20
9 for x in $1; do 21 for x in $1; do
10 CFLAGS="${CFLAGS/$x}" 22 CFLAGS="${CFLAGS/$x}"
11 CXXFLAGS="${CXXFLAGS/$x}" 23 CXXFLAGS="${CXXFLAGS/$x}"
12 done 24 done
13 25
14} 26}
15 27
16max-optim () { 28append-flags () {
17 29
18 for x in $CFLAGS; do 30
19 echo $x 31 CFLAGS="$CFLAGS $1"
20 done 32 CXXFLAGS="$CXXFLAGS $1"
21 33
22} 34}
35
36change-flags () {
37
38 CFLAGS="${CFLAGS/${1}/${2}"
39 CXXFLAGS="${CXXFLAGS/${1}/${2}"
40
41}

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.20