summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-05-20 12:55:06 +0000
committerMike Frysinger <vapier@gentoo.org>2012-05-20 12:55:06 +0000
commitacb6584c09d7d456e14bd05704c703864c710ae1 (patch)
treea3b962cf8a19d7cd6ae571c1d964f3cf23e843f5 /eclass/autotools.eclass
parentUse new _elibtoolize behavior for automatically eliding --install. (diff)
downloadhistorical-acb6584c09d7d456e14bd05704c703864c710ae1.tar.gz
historical-acb6584c09d7d456e14bd05704c703864c710ae1.tar.bz2
historical-acb6584c09d7d456e14bd05704c703864c710ae1.zip
allow autotools_check_macro_val to take multiple macros when the values can safely be merged by the caller (like macros that implicitly create dirs, and we just want a list of all those dirs)
Diffstat (limited to 'eclass/autotools.eclass')
-rw-r--r--eclass/autotools.eclass26
1 files changed, 16 insertions, 10 deletions
diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
index 6fc603a00ed9..95358164b965 100644
--- a/eclass/autotools.eclass
+++ b/eclass/autotools.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.135 2012/05/20 12:38:33 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/autotools.eclass,v 1.136 2012/05/20 12:55:06 vapier Exp $
# @ECLASS: autotools.eclass
# @MAINTAINER:
@@ -416,16 +416,22 @@ autotools_check_macro() {
return 0
}
-# Internal function to look for a macro and extract its value
+# @FUNCTION: autotools_check_macro_val
+# @USAGE: <macro> [macros]
+# @INTERNAL
+# @DESCRIPTION:
+# Look for a macro and extract its value.
autotools_check_macro_val() {
- local macro=$1 scan_out
-
- autotools_check_macro "${macro}" | \
- gawk -v macro="${macro}" \
- '($0 !~ /^[[:space:]]*(#|dnl)/) {
- if (match($0, macro ":(.*)$", res))
- print res[1]
- }' | uniq
+ local macro scan_out
+
+ for macro ; do
+ autotools_check_macro "${macro}" | \
+ gawk -v macro="${macro}" \
+ '($0 !~ /^[[:space:]]*(#|dnl)/) {
+ if (match($0, macro ":(.*)$", res))
+ print res[1]
+ }' | uniq
+ done
return 0
}