diff options
author | Valentin David <valentin.david@gmail.com> | 2018-09-08 20:07:29 +0000 |
---|---|---|
committer | Valentin David <valentin.david@gmail.com> | 2018-09-08 20:07:29 +0000 |
commit | 886a836effa2ddaf740a1281487356e775d0c4f0 (patch) | |
tree | 745ec07c280bffd01fa14bc2e3c3a908e688ddba | |
parent | f52169b2994e671754607275711421df5c3af830 (diff) | |
parent | 8326b0f7b39970305186526af0d8f763194af8df (diff) | |
download | buildstream-886a836effa2ddaf740a1281487356e775d0c4f0.tar.gz |
Merge branch 'coldtom/autotools-libtool' into 'master'
Upstream freedesktop-sdk autotools config for libtool .la files
See merge request BuildStream/buildstream!683
-rw-r--r-- | buildstream/plugins/elements/autotools.yaml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/buildstream/plugins/elements/autotools.yaml b/buildstream/plugins/elements/autotools.yaml index 021d3815c..7adafd472 100644 --- a/buildstream/plugins/elements/autotools.yaml +++ b/buildstream/plugins/elements/autotools.yaml @@ -50,6 +50,40 @@ variables: # # notparallel: True + + # Automatically remove libtool archive files + # + # Set remove-libtool-modules to "true" to remove .la files for + # modules intended to be opened with lt_dlopen() + # + # Set remove-libtool-libraries to "true" to remove .la files for + # libraries + # + # Value must be "true" or "false" + remove-libtool-modules: "false" + remove-libtool-libraries: "false" + + delete-libtool-archives: | + if %{remove-libtool-modules} || %{remove-libtool-libraries}; then + find "%{install-root}" -name "*.la" -print0 | while read -d '' -r file; do + if grep '^shouldnotlink=yes$' "${file}" &>/dev/null; then + if %{remove-libtool-modules}; then + echo "Removing ${file}." + rm "${file}" + else + echo "Not removing ${file}." + fi + else + if %{remove-libtool-libraries}; then + echo "Removing ${file}." + rm "${file}" + else + echo "Not removing ${file}." + fi + fi + done + fi + config: # Commands for configuring the software @@ -72,6 +106,8 @@ config: install-commands: - | %{make-install} + - | + %{delete-libtool-archives} # Commands for stripping debugging information out of # installed binaries |