1 |
commit: 519fafed4a8220edd03a14094989fc2ee07df30f |
2 |
Author: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 9 21:49:27 2019 +0000 |
4 |
Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Jan 13 22:47:16 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=519fafed |
7 |
|
8 |
waf-utils.eclass: Simplify output of configure command and arguments |
9 |
|
10 |
We can just assign these to an array and echo before executing. Using |
11 |
@Q makes Bash quote the output. This only works in Bash 4.4 and later |
12 |
but on earlier versions, it simply doesn't quote. |
13 |
|
14 |
Signed-off-by: James Le Cuirot <chewi <AT> gentoo.org> |
15 |
|
16 |
eclass/waf-utils.eclass | 20 +++++++++++++------- |
17 |
1 file changed, 13 insertions(+), 7 deletions(-) |
18 |
|
19 |
diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass |
20 |
index 878068fc9f4..dc21baafc9d 100644 |
21 |
--- a/eclass/waf-utils.eclass |
22 |
+++ b/eclass/waf-utils.eclass |
23 |
@@ -1,4 +1,4 @@ |
24 |
-# Copyright 1999-2015 Gentoo Foundation |
25 |
+# Copyright 1999-2019 Gentoo Authors |
26 |
# Distributed under the terms of the GNU General Public License v2 |
27 |
|
28 |
# @ECLASS: waf-utils.eclass |
29 |
@@ -84,13 +84,19 @@ waf-utils_src_configure() { |
30 |
[[ -z ${NO_WAF_LIBDIR} ]] && libdir=(--libdir="${EPREFIX}/usr/$(get_libdir)") |
31 |
|
32 |
tc-export AR CC CPP CXX RANLIB |
33 |
- echo "CCFLAGS=\"${CFLAGS}\" LINKFLAGS=\"${CFLAGS} ${LDFLAGS}\" \"${WAF_BINARY}\" --prefix=${EPREFIX}/usr ${libdir[@]} $@ configure" |
34 |
|
35 |
- CCFLAGS="${CFLAGS}" LINKFLAGS="${CFLAGS} ${LDFLAGS}" "${WAF_BINARY}" \ |
36 |
- "--prefix=${EPREFIX}/usr" \ |
37 |
- "${libdir[@]}" \ |
38 |
- "${@}" \ |
39 |
- configure || die "configure failed" |
40 |
+ local CMD=( |
41 |
+ CCFLAGS="${CFLAGS}" |
42 |
+ LINKFLAGS="${CFLAGS} ${LDFLAGS}" |
43 |
+ "${WAF_BINARY}" |
44 |
+ "--prefix=${EPREFIX}/usr" |
45 |
+ "${libdir[@]}" |
46 |
+ "${@}" |
47 |
+ configure |
48 |
+ ) |
49 |
+ |
50 |
+ echo "${CMD[@]@Q}" >&2 |
51 |
+ env "${CMD[@]}" || die "configure failed" |
52 |
} |
53 |
|
54 |
# @FUNCTION: waf-utils_src_compile |