summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorLianhao Lu <lianhao.lu@intel.com>2011-02-17 10:48:12 +0800
committerSaul Wold <sgw@linux.intel.com>2011-02-17 17:25:21 -0800
commit6dc50b17360dfde34d01125a6f9747fcb530be1d (patch)
tree8e0ff61160103ff320deb42868c8df7b6662aa80 /meta
parentf09f8f4aa32d134081a5bd8a5cff631a2e7935f7 (diff)
downloadopenembedded-core-6dc50b17360dfde34d01125a6f9747fcb530be1d.tar.gz
openembedded-core-6dc50b17360dfde34d01125a6f9747fcb530be1d.tar.bz2
openembedded-core-6dc50b17360dfde34d01125a6f9747fcb530be1d.tar.xz
openembedded-core-6dc50b17360dfde34d01125a6f9747fcb530be1d.zip
toolchain-script/populate_sdk/meta-toolchain: moving common code.
moving common code between populate_sdk.bbclass and meta-environment.bb into toolchain-script.bbclass. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/populate_sdk.bbclass13
-rw-r--r--meta/classes/toolchain-scripts.bbclass24
-rw-r--r--meta/recipes-core/meta/meta-environment.bb16
3 files changed, 29 insertions, 24 deletions
diff --git a/meta/classes/populate_sdk.bbclass b/meta/classes/populate_sdk.bbclass
index 7e260ef38..474b43bb9 100644
--- a/meta/classes/populate_sdk.bbclass
+++ b/meta/classes/populate_sdk.bbclass
@@ -38,21 +38,12 @@ fakeroot do_populate_sdk() {
ln -s /etc/ld.so.cache ${SDK_OUTPUT}/${SDKPATHNATIVE}/etc/ld.so.cache
# Setup site file for external use
- siteconfig=${SDK_OUTPUT}/${SDKPATH}/site-config-${MULTIMACH_TARGET_SYS}
- touch $siteconfig
- for sitefile in ${CONFIG_SITE} ; do
- cat $sitefile >> $siteconfig
- done
+ toolchain_create_sdk_siteconfig ${SDK_OUTPUT}/${SDKPATH}/site-config-${MULTIMACH_TARGET_SYS} ${CONFIG_SITE}
toolchain_create_sdk_env_script
# Add version information
- versionfile=${SDK_OUTPUT}/${SDKPATH}/version-${MULTIMACH_TARGET_SYS}
- touch $versionfile
- echo 'Distro: ${DISTRO}' >> $versionfile
- echo 'Distro Version: ${DISTRO_VERSION}' >> $versionfile
- echo 'Metadata Revision: ${METADATA_REVISION}' >> $versionfile
- echo 'Timestamp: ${DATETIME}' >> $versionfile
+ toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${MULTIMACH_TARGET_SYS}
# Package it up
mkdir -p ${SDK_DEPLOY}
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index fb59761fd..2b9cfac6a 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -88,3 +88,27 @@ toolchain_create_sdk_env_script_for_installer () {
echo 'export POKY_DISTRO_VERSION="${DISTRO_VERSION}"' >> $script
echo 'export POKY_SDK_VERSION="${SDK_VERSION}"' >> $script
}
+
+#This function create a site config file
+toolchain_create_sdk_siteconfig () {
+ local siteconfig=$1
+ shift
+ local files=$@
+
+ rm -f $siteconfig
+ touch $siteconfig
+ for sitefile in ${files} ; do
+ cat $sitefile >> $siteconfig
+ done
+}
+
+#This function create a version information file
+toolchain_create_sdk_version () {
+ local versionfile=$1
+ rm -f $versionfile
+ touch $versionfile
+ echo 'Distro: ${DISTRO}' >> $versionfile
+ echo 'Distro Version: ${DISTRO_VERSION}' >> $versionfile
+ echo 'Metadata Revision: ${METADATA_REVISION}' >> $versionfile
+ echo 'Timestamp: ${DATETIME}' >> $versionfile
+}
diff --git a/meta/recipes-core/meta/meta-environment.bb b/meta/recipes-core/meta/meta-environment.bb
index 4ba919f7f..0b8826032 100644
--- a/meta/recipes-core/meta/meta-environment.bb
+++ b/meta/recipes-core/meta/meta-environment.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Package of environment files for SDK"
LIC_FILES_CHKSUM = "file://${POKYBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
file://${POKYBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
LICENSE = "MIT"
-PR = "r1"
+PR = "r2"
EXCLUDE_FROM_WORLD = "1"
@@ -22,22 +22,12 @@ do_generate_content() {
rm -rf ${SDK_OUTPUT}
mkdir -p ${SDK_OUTPUT}/${SDKPATH}
- siteconfig=${SDK_OUTPUT}/${SDKPATH}/site-config-${OLD_MULTIMACH_TARGET_SYS}
-
- touch $siteconfig
- for sitefile in ${TARGET_CONFIG_SITE} ; do
- cat $sitefile >> $siteconfig
- done
+ toolchain_create_sdk_siteconfig ${SDK_OUTPUT}/${SDKPATH}/site-config-${OLD_MULTIMACH_TARGET_SYS} ${TARGET_CONFIG_SITE}
toolchain_create_sdk_env_script_for_installer
# Add version information
- versionfile=${SDK_OUTPUT}/${SDKPATH}/version-${OLD_MULTIMACH_TARGET_SYS}
- touch $versionfile
- echo 'Distro: ${DISTRO}' >> $versionfile
- echo 'Distro Version: ${DISTRO_VERSION}' >> $versionfile
- echo 'Metadata Revision: ${METADATA_REVISION}' >> $versionfile
- echo 'Timestamp: ${DATETIME}' >> $versionfile
+ toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${OLD_MULTIMACH_TARGET_SYS}
}
addtask generate_content before do_install after do_compile