summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-03-24 07:07:18 +0000
committerMike Frysinger <vapier@gentoo.org>2007-03-24 07:07:18 +0000
commit0b9329c3d7fe962d9f599c97c1354331389139d0 (patch)
treecd387ee5ba36f757166f162208f66511d7429d5b /eclass/flag-o-matic.eclass
parentVersion bump. (diff)
downloadhistorical-0b9329c3d7fe962d9f599c97c1354331389139d0.tar.gz
historical-0b9329c3d7fe962d9f599c97c1354331389139d0.tar.bz2
historical-0b9329c3d7fe962d9f599c97c1354331389139d0.zip
add new function append-cppflags and support CPPFLAGS a little better
Diffstat (limited to 'eclass/flag-o-matic.eclass')
-rw-r--r--eclass/flag-o-matic.eclass11
1 files changed, 9 insertions, 2 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index a3a1514611ce..e27ff333c666 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2007 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.117 2007/03/04 21:13:17 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.118 2007/03/24 07:07:18 vapier Exp $
#
# Maintainer: toolchain@gentoo.org
@@ -167,6 +167,7 @@ _filter-var() {
filter-flags() {
_filter-hardened "$@"
_filter-var CFLAGS "$@"
+ _filter-var CPPFLAGS "$@"
_filter-var CXXFLAGS "$@"
return 0
}
@@ -176,9 +177,15 @@ filter-lfs-flags() {
filter-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
}
+append-cppflags() {
+ [[ -z $* ]] && return 0
+ export CPPFLAGS="${CPPFLAGS} $*"
+ return 0
+}
+
append-lfs-flags() {
[[ -n $@ ]] && die "append-lfs-flags takes no arguments"
- append-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
+ append-cppflags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
}
append-flags() {