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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Mon Jun 17 04:44:53 2002 UTC (12 years, 6 months ago) by drobbins
Branch: MAIN
Changes since 1.4: +2 -2 lines
fixing a verwilst typo in flag-o-matic eclass

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

  ViewVC Help
Powered by ViewVC 1.1.20