1 |
--- |
2 |
eclass/autotools-utils.eclass | 13 ++++++++++++- |
3 |
1 files changed, 12 insertions(+), 1 deletions(-) |
4 |
|
5 |
diff --git a/eclass/autotools-utils.eclass b/eclass/autotools-utils.eclass |
6 |
index fd644bb..84f6cb6 100644 |
7 |
--- a/eclass/autotools-utils.eclass |
8 |
+++ b/eclass/autotools-utils.eclass |
9 |
@@ -144,6 +144,17 @@ _check_build_dir() { |
10 |
# See autotools-utils_src_install for reference. |
11 |
remove_libtool_files() { |
12 |
debug-print-function ${FUNCNAME} "$@" |
13 |
+ local removing_all |
14 |
+ [[ ${#} -le 1 ]] || die "Invalid number of args to ${FUNCNAME}()" |
15 |
+ if [[ ${#} -eq 1 ]]; then |
16 |
+ case "${1}" in |
17 |
+ all) |
18 |
+ removing_all=1 |
19 |
+ ;; |
20 |
+ *) |
21 |
+ die "Invalid argument to ${FUNCNAME}(): ${1}" |
22 |
+ esac |
23 |
+ fi |
24 |
|
25 |
local f |
26 |
find "${D}" -type f -name '*.la' -print0 | while read -r -d '' f; do |
27 |
@@ -154,7 +165,7 @@ remove_libtool_files() { |
28 |
# Keep .la files when: |
29 |
# - they have shouldnotlink=yes - likely plugins, |
30 |
# - respective static archive exists. |
31 |
- if [[ "$1" == 'all' || ( -z ${shouldnotlink} && ! -f ${archivefile} ) ]]; then |
32 |
+ if [[ ${removing_all} || ( -z ${shouldnotlink} && ! -f ${archivefile} ) ]]; then |
33 |
einfo "Removing unnecessary ${f#${D%/}}" |
34 |
rm -f "${f}" || die |
35 |
fi |
36 |
-- |
37 |
1.7.6.1 |