diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-05-23 23:12:07 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-05-23 23:12:07 +0000 |
commit | 26811d1431ad04feb5cd9458bfceab1b3bef57d9 (patch) | |
tree | 675a15f3b1b239c7ed977b4ff1bbf8b124da37ff /eclass | |
parent | Version bump. Makes translations actually work; translation updates (diff) | |
download | gentoo-2-26811d1431ad04feb5cd9458bfceab1b3bef57d9.tar.gz gentoo-2-26811d1431ad04feb5cd9458bfceab1b3bef57d9.tar.bz2 gentoo-2-26811d1431ad04feb5cd9458bfceab1b3bef57d9.zip |
add a dedicated append-cflags function and define append-flags in terms of other append-*flags functions
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/flag-o-matic.eclass | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index 87532ab5c5e9..1ef79a64c83c 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2009 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.135 2009/05/23 23:06:55 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.136 2009/05/23 23:12:07 vapier Exp $ # @ECLASS: flag-o-matic.eclass # @MAINTAINER: @@ -136,6 +136,16 @@ append-cppflags() { return 0 } +# @FUNCTION: append-cflags +# @USAGE: <flags> +# @DESCRIPTION: +# Add extra <flags> to the current CFLAGS. +append-cppflags() { + [[ -z $* ]] && return 0 + export CFLAGS="${CFLAGS} $*" + return 0 +} + # @FUNCTION: append-cxxflags # @USAGE: <flags> # @DESCRIPTION: @@ -171,10 +181,9 @@ append-lfs-flags() { # Add extra <flags> to your current {C,CXX,F,FC}FLAGS. append-flags() { [[ -z $* ]] && return 0 - export CFLAGS="${CFLAGS} $*" - export CXXFLAGS="${CXXFLAGS} $*" - export FFLAGS="${FFLAGS} $*" - export FCFLAGS="${FCFLAGS} $*" + append-cflags "$@" + append-cppflags "$@" + append-fflags "$@" return 0 } |