]> code.ossystems Code Review - openembedded-core.git/commitdiff
meta-toolchain: Generate site config files and an environmental setup script
authorRichard Purdie <richard@openedhand.com>
Wed, 19 Dec 2007 18:28:49 +0000 (18:28 +0000)
committerRichard Purdie <richard@openedhand.com>
Wed, 19 Dec 2007 18:28:49 +0000 (18:28 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3365 311d38ba-8fff-0310-9ca6-ca027cbcb966

meta/packages/meta/meta-toolchain.bb

index ab35204c6a5ed7a67798a231a131442719e7b335..bf098a4ef1d1264904d3f97301964d5083c9e519 100644 (file)
@@ -93,17 +93,34 @@ do_populate_sdk() {
                done
        done
 
-       # remove unwanted executables
+       # Remove unwanted executables
        rm -rf ${SDK_OUTPUT}/${prefix}/sbin ${SDK_OUTPUT}/${prefix}/etc
 
-       # remove broken .la files
+       # Remove broken .la files
        rm -f ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/*.la
 
+       # Generate link for sysroot use
        # /usr/local/poky/eabi-glibc/arm/arm-poky-linux-gnueabi/usr -> .
        cd ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}
        ln -sf . usr 
 
-        mkdir -p ${SDK_DEPLOY}
+       # Setup site file for external use
+       siteconfig=${SDK_OUTPUT}/${prefix}/site-config
+       touch $siteconfig
+       for sitefile in ${CONFIG_SITE} ; do
+               cat $sitefile >> $siteconfig
+       done
+
+       # Create environment setup script
+       script=${SDK_OUTPUT}/${prefix}/environment-setup
+       touch $script
+       echo 'export PATH=${prefix}/bin:$PATH' >> $script
+       echo 'export PKG_CONFIG_SYSROOT_DIR=${prefix}/${TARGET_SYS}' >> $script
+       echo 'export PKG_CONFIG_PATH=${prefix}/${TARGET_SYS}/lib/pkgconfig' >> $script
+       echo 'export CONFIG_SITE=${prefix}/site-config' >> $script
+
+       # Package it up
+       mkdir -p ${SDK_DEPLOY}
        cd ${SDK_OUTPUT}
        fakeroot tar cfj ${SDK_DEPLOY}/${SDK_NAME}-toolchain-${DISTRO_VERSION}.tar.bz2 .
 }