summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Verwilst <verwilst@gentoo.org>2002-06-16 21:45:10 +0000
committerBart Verwilst <verwilst@gentoo.org>2002-06-16 21:45:10 +0000
commit3029a51022156a56ba4145f0b2795e8c746ccccf (patch)
treeb63a8ce2e362e1375059e3be3c2d98a0483e4b4c /eclass/flag-o-matic.eclass
parentAdded gkrellshoot and gkrellmweather (diff)
downloadgentoo-2-3029a51022156a56ba4145f0b2795e8c746ccccf.tar.gz
gentoo-2-3029a51022156a56ba4145f0b2795e8c746ccccf.tar.bz2
gentoo-2-3029a51022156a56ba4145f0b2795e8c746ccccf.zip
added new change-flag class
Diffstat (limited to 'eclass/flag-o-matic.eclass')
-rw-r--r--eclass/flag-o-matic.eclass21
1 files changed, 13 insertions, 8 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index cd47ec7e2b45..48d027f14814 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -5,8 +5,17 @@
ECLASS=flag-o-matic
#
-#Remove particular flags from C[XX]FLAGS
+#### filter-flags <flag> ####
+# Remove particular flags from C[XX]FLAGS
#
+#### append-flags <flag> ####
+# Add extra flags to your current C[XX]FLAGS
+#
+#### change-flags <orig.flag> <new.flag> ###
+# Replace a flag by another one
+#
+
+
filter-flags () {
for x in $1; do
@@ -16,9 +25,6 @@ filter-flags () {
}
-#
-#Add flags to the current C[XX]FLAGS
-#
append-flags () {
@@ -27,10 +33,9 @@ append-flags () {
}
-max-optim () {
+change-flags () {
- for x in $CFLAGS; do
- echo $x
- done
+ CFLAGS="${CFLAGS/${1}/${2}"
+ CXXFLAGS="${CXXFLAGS/${1}/${2}"
}