Fix handling whitespace in filenames when looking for .la files.
authorMichał Górny <mgorny@gentoo.org>
Fri, 16 Sep 2011 15:20:03 +0000 (15:20 +0000)
committerMichał Górny <mgorny@gentoo.org>
Fri, 16 Sep 2011 15:20:03 +0000 (15:20 +0000)
eclass/autotools-utils.eclass

index ad5ffea55f16586670b5fd2ce506629ea6fd609f..8a7714790b5c043ed89a080a2f9371dce179a244 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.11 2011/09/12 20:32:41 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/autotools-utils.eclass,v 1.12 2011/09/16 15:20:03 mgorny Exp $
 
 # @ECLASS: autotools-utils.eclass
 # @MAINTAINER:
@@ -146,7 +146,7 @@ remove_libtool_files() {
        debug-print-function ${FUNCNAME} "$@"
 
        local f
-       for f in $(find "${D}" -type f -name '*.la'); do
+       find "${D}" -type f -name '*.la' -print0 | while read -r -d '' f; do
                # Keep only .la files with shouldnotlink=yes - likely plugins
                local shouldnotlink=$(sed -ne '/^shouldnotlink=yes$/p' "${f}")
                if [[  "$1" == 'all' || -z ${shouldnotlink} ]]; then