1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 17:19:20 +00:00

gcc-cross-canadian: Clean non shipped empty directories.

Cleaning up non shipped empty directories.

(From OE-Core rev: e2fd32919e1d96136528c61677bdfeee2b064320)

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Lianhao Lu
2012-03-27 12:38:29 +08:00
committed by Richard Purdie
parent d3e0beed9e
commit 2e4ca98b7c
@@ -47,11 +47,12 @@ do_install () {
rm -f ${D}${libdir}/libiberty.a
# Cleanup empty directories which are not shipped
# we use rmdir instead of 'rm -f' to ensure the directories are empty
rmdir ${D}${libdir}/../lib
rmdir ${D}${prefix}/${TARGET_SYS}/lib
rmdir ${D}${prefix}/${TARGET_SYS}
rmdir ${D}${includedir}
# we use rmdir instead of 'rm -f' to ensure the non empty directories are not deleted
# ${D}${libdir}/../lib only seems to appear with SDKMACHINE=i686
local empty_dirs="${D}${libdir}/../lib ${D}${prefix}/${TARGET_SYS}/lib ${D}${prefix}/${TARGET_SYS} ${D}${includedir}"
for i in $empty_dirs; do
[ -d $i ] && rmdir --ignore-fail-on-non-empty $i
done
# Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
# found.