diff options
author | Michał Górny <mgorny@gentoo.org> | 2016-02-28 19:29:21 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2016-02-28 19:29:56 +0100 |
commit | dc35e691fe2467033044dfdaf13dc8a855b4dd41 (patch) | |
tree | 3e99c7ccc053964c3cb2c0ed6dfb40c9bd1a7f79 /eclass | |
parent | waf-utils.eclass: Do not inherit eutils in EAPI 6+ (diff) | |
download | gentoo-dc35e691fe2467033044dfdaf13dc8a855b4dd41.tar.gz gentoo-dc35e691fe2467033044dfdaf13dc8a855b4dd41.tar.bz2 gentoo-dc35e691fe2467033044dfdaf13dc8a855b4dd41.zip |
waf-utils.eclass: Simplify --libdir passing logic using arrays
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/waf-utils.eclass | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/eclass/waf-utils.eclass b/eclass/waf-utils.eclass index 7372e8ded26c..df5de245e85a 100644 --- a/eclass/waf-utils.eclass +++ b/eclass/waf-utils.eclass @@ -69,7 +69,7 @@ waf-utils_src_configure() { [[ ${fail} ]] && die "Invalid use of waf-utils.eclass" - local libdir="" + local libdir=() # @ECLASS-VARIABLE: WAF_BINARY # @DESCRIPTION: @@ -81,25 +81,16 @@ waf-utils_src_configure() { # @DESCRIPTION: # Variable specifying that you don't want to set the libdir for waf script. # Some scripts does not allow setting it at all and die if they find it. - [[ -z ${NO_WAF_LIBDIR} ]] && libdir="--libdir=${EPREFIX}/usr/$(get_libdir)" + [[ -z ${NO_WAF_LIBDIR} ]] && libdir=(--libdir="${EPREFIX}/usr/$(get_libdir)") tc-export AR CC CPP CXX RANLIB - echo "CCFLAGS=\"${CFLAGS}\" LINKFLAGS=\"${CFLAGS} ${LDFLAGS}\" \"${WAF_BINARY}\" --prefix=${EPREFIX}/usr ${libdir} $@ configure" - - # This condition is required because waf takes even whitespace as function - # calls, awesome isn't it? - if [[ -z ${NO_WAF_LIBDIR} ]]; then - CCFLAGS="${CFLAGS}" LINKFLAGS="${CFLAGS} ${LDFLAGS}" "${WAF_BINARY}" \ - "--prefix=${EPREFIX}/usr" \ - "${libdir}" \ - "$@" \ - configure || die "configure failed" - else - CCFLAGS="${CFLAGS}" LINKFLAGS="${CFLAGS} ${LDFLAGS}" "${WAF_BINARY}" \ - "--prefix=${EPREFIX}/usr" \ - "$@" \ - configure || die "configure failed" - fi + echo "CCFLAGS=\"${CFLAGS}\" LINKFLAGS=\"${CFLAGS} ${LDFLAGS}\" \"${WAF_BINARY}\" --prefix=${EPREFIX}/usr ${libdir[@]} $@ configure" + + CCFLAGS="${CFLAGS}" LINKFLAGS="${CFLAGS} ${LDFLAGS}" "${WAF_BINARY}" \ + "--prefix=${EPREFIX}/usr" \ + "${libdir[@]}" \ + "$@" \ + configure || die "configure failed" } # @FUNCTION: waf-utils_src_compile |