summaryrefslogtreecommitdiff
path: root/meta/classes/autotools.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-03-20 10:52:05 +0000
committerRichard Purdie <richard@openedhand.com>2008-03-20 10:52:05 +0000
commit013882eb9af603f46b5e089a7b9d58ae7a1afc44 (patch)
tree08d809b736f33b8b687941a97d50b499e000392b /meta/classes/autotools.bbclass
parent33010a80bf707c91fac5129bc18442e0e1ec7df1 (diff)
downloadopenembedded-core-013882eb9af603f46b5e089a7b9d58ae7a1afc44.tar.gz
openembedded-core-013882eb9af603f46b5e089a7b9d58ae7a1afc44.tar.bz2
openembedded-core-013882eb9af603f46b5e089a7b9d58ae7a1afc44.zip
autotools.bbclass: Add autotools_stage_dir to help staging directories and increase list of directories to stage (include base_sbin, base_bin and libexec)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4098 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/classes/autotools.bbclass')
-rw-r--r--meta/classes/autotools.bbclass38
1 files changed, 19 insertions, 19 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 8c1607405e..fe5607e553 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -165,6 +165,17 @@ autotools_stage_includes() {
fi
}
+autotools_stage_dir() {
+ from="$1"
+ to="$2"
+ # This will remove empty directories so we can ignore them
+ rmdir "$from" 2> /dev/null || true
+ if [ -d "$from" ]; then
+ mkdir -p "$to"
+ cp -fpPR -t "$to" "$from"/*
+ fi
+}
+
autotools_stage_all() {
if [ "${INHIBIT_AUTO_STAGE}" = "1" ]
then
@@ -173,19 +184,13 @@ autotools_stage_all() {
rm -rf ${STAGE_TEMP}
mkdir -p ${STAGE_TEMP}
oe_runmake DESTDIR="${STAGE_TEMP}" install
- if [ -d ${STAGE_TEMP}/${includedir} ]; then
- mkdir -p ${STAGING_INCDIR}
- cp -fpPR -t ${STAGING_INCDIR} ${STAGE_TEMP}/${includedir}/*
- fi
+ autotools_stage_dir ${STAGE_TEMP}/${includedir} ${STAGING_INCDIR}
if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then
- if [ -d ${STAGE_TEMP}/${bindir} ]; then
- mkdir -p ${STAGING_DIR_HOST}${layout_bindir}
- cp -fpPR -t ${STAGING_DIR_HOST}/${layout_bindir} ${STAGE_TEMP}/${bindir}/*
- fi
- if [ -d ${STAGE_TEMP}/${sbindir} ]; then
- mkdir -p ${STAGING_DIR_HOST}${layout_sbindir}
- cp -fpPR -t ${STAGING_DIR_HOST}/${layout_sbindir} ${STAGE_TEMP}/${sbindir}/*
- fi
+ autotools_stage_dir ${STAGE_TEMP}/${bindir} ${STAGING_DIR_HOST}${layout_bindir}
+ autotools_stage_dir ${STAGE_TEMP}/${sbindir} ${STAGING_DIR_HOST}${layout_sbindir}
+ autotools_stage_dir ${STAGE_TEMP}/${base_bindir} ${STAGING_DIR_HOST}${layout_base_bindir}
+ autotools_stage_dir ${STAGE_TEMP}/${base_sbindir} ${STAGING_DIR_HOST}${layout_base_sbindir}
+ autotools_stage_dir ${STAGE_TEMP}/${libexecdir} ${STAGING_DIR_HOST}${layout_libexecdir}
fi
if [ -d ${STAGE_TEMP}/${libdir} ]
then
@@ -212,13 +217,8 @@ autotools_stage_all() {
fi
rm -rf ${STAGE_TEMP}/${mandir} || true
rm -rf ${STAGE_TEMP}/${infodir} || true
- # This will remove an empty directory so we can ignore it
- rmdir ${STAGE_TEMP}/${datadir} || true
- if [ -d ${STAGE_TEMP}/${datadir} ]; then
- install -d ${STAGING_DATADIR}/
- cp -fpPR ${STAGE_TEMP}/${datadir}/* ${STAGING_DATADIR}/
- fi
- rm -rf ${STAGE_TEMP}
+ autotools_stage_dir ${STAGE_TEMP}/${datadir} ${STAGING_DATADIR}
+ #rm -rf ${STAGE_TEMP}
}
EXPORT_FUNCTIONS do_configure do_install