diff options
author | Jonathan Callen <abcd@gentoo.org> | 2010-04-02 02:50:29 +0000 |
---|---|---|
committer | Jonathan Callen <abcd@gentoo.org> | 2010-04-02 02:50:29 +0000 |
commit | e0f8186c7ac97c6feb1f744722f78b2fe2e00afd (patch) | |
tree | 28833ee29d65ed814176f04a34ed78e3e92bfe5e /eclass | |
parent | Revision bump for new genpatches. (diff) | |
download | gentoo-2-e0f8186c7ac97c6feb1f744722f78b2fe2e00afd.tar.gz gentoo-2-e0f8186c7ac97c6feb1f744722f78b2fe2e00afd.tar.bz2 gentoo-2-e0f8186c7ac97c6feb1f744722f78b2fe2e00afd.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: |