]> code.ossystems Code Review - openembedded-core.git/commitdiff
remove-libtool: add new class
authorRoss Burton <ross.burton@intel.com>
Fri, 29 Jan 2016 21:24:40 +0000 (21:24 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 2 Feb 2016 14:42:15 +0000 (14:42 +0000)
This class adds a postfunc to do_install to remove all .la files installed by
libtool, so that they are absent from both the sysroots and target packages.

If a recipe needs these files to be installed then it can be overridden by
setting REMOVE_LIBTOOL_LA.

Note that this class isn't enabled by default.

[ YOCTO #2380 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/remove-libtool.bbclass [new file with mode: 0644]

diff --git a/meta/classes/remove-libtool.bbclass b/meta/classes/remove-libtool.bbclass
new file mode 100644 (file)
index 0000000..3fd0cd5
--- /dev/null
@@ -0,0 +1,11 @@
+# This class removes libtool .la files after do_install
+
+REMOVE_LIBTOOL_LA ?= "1"
+
+remove_libtool_la() {
+       if [ "${REMOVE_LIBTOOL_LA}" != "0" ]; then
+               find "${D}" -ignore_readdir_race -name "*.la" -delete
+       fi
+}
+
+do_install[postfuncs] += "remove_libtool_la"