summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc
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:26:35 +0100
commit2e4ca98b7c1294a1001b5a0a8cb4a969ab421552 (patch)
tree28756a36e62f35eacf60de912d3751e5b3a25c36 /meta/recipes-devtools/gcc
parentd3e0beed9eef53018158c9f999cd20b44629aa61 (diff)
downloadpoky-2e4ca98b7c1294a1001b5a0a8cb4a969ab421552.tar.gz
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>
Diffstat (limited to 'meta/recipes-devtools/gcc')
-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 () {
47 rm -f ${D}${libdir}/libiberty.a 47 rm -f ${D}${libdir}/libiberty.a
48 48
49 # Cleanup empty directories which are not shipped 49 # Cleanup empty directories which are not shipped
50 # we use rmdir instead of 'rm -f' to ensure the directories are empty 50 # we use rmdir instead of 'rm -f' to ensure the non empty directories are not deleted
51 rmdir ${D}${libdir}/../lib 51 # ${D}${libdir}/../lib only seems to appear with SDKMACHINE=i686
52 rmdir ${D}${prefix}/${TARGET_SYS}/lib 52 local empty_dirs="${D}${libdir}/../lib ${D}${prefix}/${TARGET_SYS}/lib ${D}${prefix}/${TARGET_SYS} ${D}${includedir}"
53 rmdir ${D}${prefix}/${TARGET_SYS} 53 for i in $empty_dirs; do
54 rmdir ${D}${includedir} 54 [ -d $i ] && rmdir --ignore-fail-on-non-empty $i
55 done
55 56
56 # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are 57 # Insert symlinks into libexec so when tools without a prefix are searched for, the correct ones are
57 # found. 58 # found.