From bec587550680e419a7e1d5a8ccd42ecbdb7e3626 Mon Sep 17 00:00:00 2001 From: Aron Griffis Date: Sun, 14 Nov 2004 03:25:58 +0000 Subject: [PATCH] fix mozconfig_final to resolve to a single --enable-extensions option --- eclass/mozconfig.eclass | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/eclass/mozconfig.eclass b/eclass/mozconfig.eclass index a44bb7209ed8..721c1248b703 100644 --- a/eclass/mozconfig.eclass +++ b/eclass/mozconfig.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/mozconfig.eclass,v 1.1 2004/11/13 23:23:08 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/mozconfig.eclass,v 1.2 2004/11/14 03:25:58 agriffis Exp $ # # mozconfig.eclass: the new mozilla.eclass @@ -257,9 +257,9 @@ mozconfig_use_extension() { mozconfig_annotate "${minus:-+}${1}" --enable-extensions=${minus}${2} } -# mozconfig_explain: display a table describing all configuration options paired -# with reasons -mozconfig_explain() { +# mozconfig_final: display a table describing all configuration options paired +# with reasons, then clean up extensions list +mozconfig_final() { declare ac opt hash reason echo echo "==========================================================" @@ -271,4 +271,10 @@ mozconfig_explain() { done echo "==========================================================" echo + + # Resolve multiple --enable-extensions down to one + declare exts=$(sed -n 's/^ac_add_options --enable-extensions=\([^ ]*\).*/\1/p' \ + .mozconfig | xargs) + sed -i '/^ac_add_options --enable-extensions/d' .mozconfig + echo "ac_add_options --enable-extensions=${exts// /,}" >> .mozconfig } -- 2.26.2