Test that appended flags are valid. This allows people to add flags that were unsuppo...
authorRyan Hill <rhill@gentoo.org>
Fri, 11 Nov 2011 07:06:25 +0000 (07:06 +0000)
committerRyan Hill <rhill@gentoo.org>
Fri, 11 Nov 2011 07:06:25 +0000 (07:06 +0000)
eclass/ChangeLog
eclass/flag-o-matic.eclass

index f2d727f8c3e07aab624c13ee1295c3677a3ec48a..b5d9f49afe210d44ddd3a6eca3af39059a15002d 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.6 2011/11/10 19:09:17 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.7 2011/11/11 07:06:25 dirtyepic Exp $
+
+  11 Nov 2011; Ryan Hill <dirtyepic@gentoo.org> flag-o-matic.eclass:
+  Test that appended flags are valid. This allows people to add flags that were
+  unsupported in earlier releases without needing to do version checking.
 
   10 Nov 2011; Pacho Ramos <pacho@gentoo.org> gtk-sharp-module.eclass:
   gnome-desktop-sharp stuff need gnome-desktop:2, bug #389181 by Kacper
index 217b736c0e2c829cc352a473675e5fc2271094c4..7ae62e14d3de98f059bbdd8f29241cb248b890c6 100644 (file)
@@ -1,6 +1,6 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.156 2011/10/08 18:37:30 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.157 2011/11/11 07:06:25 dirtyepic Exp $
 
 # @ECLASS: flag-o-matic.eclass
 # @MAINTAINER:
@@ -154,7 +154,7 @@ append-cppflags() {
 # Add extra <flags> to the current CFLAGS.
 append-cflags() {
        [[ -z $* ]] && return 0
-       export CFLAGS="${CFLAGS} $*"
+       export CFLAGS=$(test-flags-CC ${CFLAGS} $*)
        return 0
 }
 
@@ -164,7 +164,7 @@ append-cflags() {
 # Add extra <flags> to the current CXXFLAGS.
 append-cxxflags() {
        [[ -z $* ]] && return 0
-       export CXXFLAGS="${CXXFLAGS} $*"
+       export CXXFLAGS=$(test-flags-CXX ${CXXFLAGS} $*)
        return 0
 }
 
@@ -174,8 +174,8 @@ append-cxxflags() {
 # Add extra <flags> to the current {F,FC}FLAGS.
 append-fflags() {
        [[ -z $* ]] && return 0
-       export FFLAGS="${FFLAGS} $*"
-       export FCFLAGS="${FCFLAGS} $*"
+       export FFLAGS=$(test-flags-F77 ${FFLAGS} $*)
+       export FCFLAGS=$(test-flags-FC ${FCFLAGS} $*)
        return 0
 }