/[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.156 Revision 1.157
1# Copyright 1999-2009 Gentoo Foundation 1# Copyright 1999-2011 Gentoo Foundation
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# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.156 2011/10/08 18:37:30 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.157 2011/11/11 07:06:25 dirtyepic Exp $
4 4
5# @ECLASS: flag-o-matic.eclass 5# @ECLASS: flag-o-matic.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# toolchain@gentoo.org 7# toolchain@gentoo.org
8# @BLURB: common functions to manipulate and query toolchain flags 8# @BLURB: common functions to manipulate and query toolchain flags
152# @USAGE: <flags> 152# @USAGE: <flags>
153# @DESCRIPTION: 153# @DESCRIPTION:
154# Add extra <flags> to the current CFLAGS. 154# Add extra <flags> to the current CFLAGS.
155append-cflags() { 155append-cflags() {
156 [[ -z $* ]] && return 0 156 [[ -z $* ]] && return 0
157 export CFLAGS="${CFLAGS} $*" 157 export CFLAGS=$(test-flags-CC ${CFLAGS} $*)
158 return 0 158 return 0
159} 159}
160 160
161# @FUNCTION: append-cxxflags 161# @FUNCTION: append-cxxflags
162# @USAGE: <flags> 162# @USAGE: <flags>
163# @DESCRIPTION: 163# @DESCRIPTION:
164# Add extra <flags> to the current CXXFLAGS. 164# Add extra <flags> to the current CXXFLAGS.
165append-cxxflags() { 165append-cxxflags() {
166 [[ -z $* ]] && return 0 166 [[ -z $* ]] && return 0
167 export CXXFLAGS="${CXXFLAGS} $*" 167 export CXXFLAGS=$(test-flags-CXX ${CXXFLAGS} $*)
168 return 0 168 return 0
169} 169}
170 170
171# @FUNCTION: append-fflags 171# @FUNCTION: append-fflags
172# @USAGE: <flags> 172# @USAGE: <flags>
173# @DESCRIPTION: 173# @DESCRIPTION:
174# Add extra <flags> to the current {F,FC}FLAGS. 174# Add extra <flags> to the current {F,FC}FLAGS.
175append-fflags() { 175append-fflags() {
176 [[ -z $* ]] && return 0 176 [[ -z $* ]] && return 0
177 export FFLAGS="${FFLAGS} $*" 177 export FFLAGS=$(test-flags-F77 ${FFLAGS} $*)
178 export FCFLAGS="${FCFLAGS} $*" 178 export FCFLAGS=$(test-flags-FC ${FCFLAGS} $*)
179 return 0 179 return 0
180} 180}
181 181
182# @FUNCTION: append-lfs-flags 182# @FUNCTION: append-lfs-flags
183# @DESCRIPTION: 183# @DESCRIPTION:

Legend:
Removed from v.1.156  
changed lines
  Added in v.1.157

  ViewVC Help
Powered by ViewVC 1.1.20