summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorLianhao Lu <lianhao.lu@intel.com>2012-03-27 12:38:29 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-27 13:19:53 +0100
commite2fd32919e1d96136528c61677bdfeee2b064320 (patch)
tree4f32dee028f46d927add58c39462051ac9edecd4 /meta/recipes-devtools
parent644b7503c37fd73730dd3d7841463b158b8934ed (diff)
downloadopenembedded-core-e2fd32919e1d96136528c61677bdfeee2b064320.tar.gz
openembedded-core-e2fd32919e1d96136528c61677bdfeee2b064320.tar.bz2
openembedded-core-e2fd32919e1d96136528c61677bdfeee2b064320.zip
gcc-cross-canadian: Clean non shipped empty directories.
Cleaning up non shipped empty directories. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/gcc/gcc-package-sdk.inc11
1 files changed, 6 insertions, 5 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-package-sdk.inc b/meta/recipes-devtools/gcc/gcc-package-sdk.inc
index 95d6804e93..0cf62f1130 100644
--- a/meta/recipes-devtools/gcc/gcc-package-sdk.inc
+++ b/meta/recipes-devtools/gcc/gcc-package-sdk.inc
@@ -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.