/[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.3 Revision 1.5
9# Remove particular flags from C[XX]FLAGS 9# Remove particular flags from C[XX]FLAGS
10# 10#
11#### append-flags <flag> #### 11#### append-flags <flag> ####
12# Add extra flags to your current C[XX]FLAGS 12# Add extra flags to your current C[XX]FLAGS
13# 13#
14#### change-flags <orig.flag> <new.flag> ### 14#### replace-flags <orig.flag> <new.flag> ###
15# Replace a flag by another one 15# Replace a flag by another one
16# 16#
17 17
18 18
19filter-flags () { 19filter-flags () {
31 CFLAGS="$CFLAGS $1" 31 CFLAGS="$CFLAGS $1"
32 CXXFLAGS="$CXXFLAGS $1" 32 CXXFLAGS="$CXXFLAGS $1"
33 33
34} 34}
35 35
36change-flags () { 36replace-flags () {
37 37
38 CFLAGS="${CFLAGS/${1}/${2}" 38 CFLAGS="${CFLAGS/${1}/${2}}"
39 CXXFLAGS="${CXXFLAGS/${1}/${2}" 39 CXXFLAGS="${CXXFLAGS/${1}/${2}}"
40 40
41} 41}

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

  ViewVC Help
Powered by ViewVC 1.1.20