diff options
author | 2010-04-02 02:50:29 +0000 | |
---|---|---|
committer | 2010-04-02 02:50:29 +0000 | |
commit | 858485c0d7a6757eaccf7c297f0d0fdc2e8c2615 (patch) | |
tree | 43a3a7cd0a03f28c78625f8c73a6337844c92573 /eclass | |
parent | Revision bump for new genpatches. (diff) | |
download | historical-858485c0d7a6757eaccf7c297f0d0fdc2e8c2615.tar.gz historical-858485c0d7a6757eaccf7c297f0d0fdc2e8c2615.tar.bz2 historical-858485c0d7a6757eaccf7c297f0d0fdc2e8c2615.zip |
Add append-libs() function
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/flag-o-matic.eclass | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index b63eca4fa2df..0a0d565e87c6 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.146 2010/02/17 18:20:49 ssuominen Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.147 2010/04/02 02:50:29 abcd Exp $ # @ECLASS: flag-o-matic.eclass # @MAINTAINER: @@ -668,6 +668,21 @@ replace-sparc64-flags() { export CFLAGS CXXFLAGS } +# @FUNCTION: append-libs +# @USAGE: <libs> +# @DESCRIPTION: +# Add extra <libs> to the current LIBS. +append-libs() { + [[ -z $* ]] && return 0 + local flag + for flag in "$@"; do + [[ ${flag} == -l* ]] && flag=${flag#-l} + export LIBS="${LIBS} -l${flag}" + done + + return 0 +} + # @FUNCTION: append-ldflags # @USAGE: <flags> # @DESCRIPTION: |