summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2008-03-07 17:53:20 +0000
committerRichard Purdie <rpurdie@rpsys.net>2008-03-07 17:53:20 +0000
commitc7ad934bcea57e824c9065bb4e0d068a036c2cd2 (patch)
tree50615e68794c0679f19eee8f41646ef6e774c9d9
parent2b4b7222dfcf2e08c502c5dd3c7c005cc281bac6 (diff)
cross-linkage: Make it less destructive and safer
-rw-r--r--packages/meta/cross-linkage_1.0.bb10
1 files changed, 8 insertions, 2 deletions
diff --git a/packages/meta/cross-linkage_1.0.bb b/packages/meta/cross-linkage_1.0.bb
index 2a9caca5da..e840e607b0 100644
--- a/packages/meta/cross-linkage_1.0.bb
+++ b/packages/meta/cross-linkage_1.0.bb
@@ -21,8 +21,14 @@ do_install() {
do_stage () {
install -d ${CROSS_DIR}/${TARGET_SYS}/
- rm -rf ${CROSS_DIR}/${TARGET_SYS}/include
+ if [ -e ${CROSS_DIR}/${TARGET_SYS}/include ]; then
+ cp -pPRr ${CROSS_DIR}/${TARGET_SYS}/include/* ${STAGING_INCDIR}
+ mv ${CROSS_DIR}/${TARGET_SYS}/include/ ${CROSS_DIR}/${TARGET_SYS}/include-oldbackup
+ fi
ln -s ${STAGING_INCDIR}/ ${CROSS_DIR}/${TARGET_SYS}/include
- rm -rf ${CROSS_DIR}/${TARGET_SYS}/lib
+ if [ -e ${CROSS_DIR}/${TARGET_SYS}/lib ]; then
+ cp -pPRr ${CROSS_DIR}/${TARGET_SYS}/lib/* ${STAGING_LIBDIR}
+ mv ${CROSS_DIR}/${TARGET_SYS}/lib/ ${CROSS_DIR}/${TARGET_SYS}/lib-oldbackup
+ fi
ln -s ${STAGING_LIBDIR} ${CROSS_DIR}/${TARGET_SYS}/lib
}