Thomas Coldrick pushed to branch coldtom/autotools-libtool at BuildStream / buildstream
Commits:
-
2d75281c
by Thomas Coldrick at 2018-08-28T12:47:41Z
1 changed file:
Changes:
... | ... | @@ -50,6 +50,40 @@ variables: |
50 | 50 |
#
|
51 | 51 |
# notparallel: True
|
52 | 52 |
|
53 |
+ |
|
54 |
+ # Automatically remove libtool archive files
|
|
55 |
+ #
|
|
56 |
+ # Set remove-libtool-modules to "true" to remove .la files for
|
|
57 |
+ # modules intended to be opened with lt_dlopen()
|
|
58 |
+ #
|
|
59 |
+ # Set remove-libtool-libraries to "true" to remove .la files for
|
|
60 |
+ # libraries
|
|
61 |
+ #
|
|
62 |
+ # Value must be "true" or "false"
|
|
63 |
+ remove-libtool-modules: "false"
|
|
64 |
+ remove-libtool-libraries: "false"
|
|
65 |
+ |
|
66 |
+ delete-libtool-archives: |
|
|
67 |
+ if %{remove-libtool-modules} || %{remove-libtool-libraries};
|
|
68 |
+ find "%{install-root}" -name "*.la" -print0 | while read -d '' -r file; do
|
|
69 |
+ if grep '^shouldnotlink=yes$' "${file}" &>/dev/null; then
|
|
70 |
+ if %{remove-libtool-modules}; then
|
|
71 |
+ echo "Removing ${file}."
|
|
72 |
+ rm "${file}"
|
|
73 |
+ else
|
|
74 |
+ echo "Not removing ${file}."
|
|
75 |
+ fi
|
|
76 |
+ else
|
|
77 |
+ if %{remove-libtool-libraries}; then
|
|
78 |
+ echo "Removing ${file}."
|
|
79 |
+ rm "${file}"
|
|
80 |
+ else
|
|
81 |
+ echo "Not removing ${file}."
|
|
82 |
+ fi
|
|
83 |
+ fi
|
|
84 |
+ done
|
|
85 |
+ fi
|
|
86 |
+ |
|
53 | 87 |
config:
|
54 | 88 |
|
55 | 89 |
# Commands for configuring the software
|
... | ... | @@ -72,6 +106,8 @@ config: |
72 | 106 |
install-commands:
|
73 | 107 |
- |
|
74 | 108 |
%{make-install}
|
109 |
+ - |
|
|
110 |
+ %{delete-libtool-archives}
|
|
75 | 111 |
|
76 | 112 |
# Commands for stripping debugging information out of
|
77 | 113 |
# installed binaries
|