summaryrefslogtreecommitdiffstats
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)
downloadpoky-013882eb9af603f46b5e089a7b9d58ae7a1afc44.tar.gz
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() {
165 fi 165 fi
166} 166}
167 167
168autotools_stage_dir() {
169 from="$1"
170 to="$2"
171 # This will remove empty directories so we can ignore them
172 rmdir "$from" 2> /dev/null || true
173 if [ -d "$from" ]; then
174 mkdir -p "$to"
175 cp -fpPR -t "$to" "$from"/*
176 fi
177}
178
168autotools_stage_all() { 179autotools_stage_all() {
169 if [ "${INHIBIT_AUTO_STAGE}" = "1" ] 180 if [ "${INHIBIT_AUTO_STAGE}" = "1" ]
170 then 181 then
@@ -173,19 +184,13 @@ autotools_stage_all() {
173 rm -rf ${STAGE_TEMP} 184 rm -rf ${STAGE_TEMP}
174 mkdir -p ${STAGE_TEMP} 185 mkdir -p ${STAGE_TEMP}
175 oe_runmake DESTDIR="${STAGE_TEMP}" install 186 oe_runmake DESTDIR="${STAGE_TEMP}" install
176 if [ -d ${STAGE_TEMP}/${includedir} ]; then 187 autotools_stage_dir ${STAGE_TEMP}/${includedir} ${STAGING_INCDIR}
177 mkdir -p ${STAGING_INCDIR}
178 cp -fpPR -t ${STAGING_INCDIR} ${STAGE_TEMP}/${includedir}/*
179 fi
180 if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then 188 if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then
181 if [ -d ${STAGE_TEMP}/${bindir} ]; then 189 autotools_stage_dir ${STAGE_TEMP}/${bindir} ${STAGING_DIR_HOST}${layout_bindir}
182 mkdir -p ${STAGING_DIR_HOST}${layout_bindir} 190 autotools_stage_dir ${STAGE_TEMP}/${sbindir} ${STAGING_DIR_HOST}${layout_sbindir}
183 cp -fpPR -t ${STAGING_DIR_HOST}/${layout_bindir} ${STAGE_TEMP}/${bindir}/* 191 autotools_stage_dir ${STAGE_TEMP}/${base_bindir} ${STAGING_DIR_HOST}${layout_base_bindir}
184 fi 192 autotools_stage_dir ${STAGE_TEMP}/${base_sbindir} ${STAGING_DIR_HOST}${layout_base_sbindir}
185 if [ -d ${STAGE_TEMP}/${sbindir} ]; then 193 autotools_stage_dir ${STAGE_TEMP}/${libexecdir} ${STAGING_DIR_HOST}${layout_libexecdir}
186 mkdir -p ${STAGING_DIR_HOST}${layout_sbindir}
187 cp -fpPR -t ${STAGING_DIR_HOST}/${layout_sbindir} ${STAGE_TEMP}/${sbindir}/*
188 fi
189 fi 194 fi
190 if [ -d ${STAGE_TEMP}/${libdir} ] 195 if [ -d ${STAGE_TEMP}/${libdir} ]
191 then 196 then
@@ -212,13 +217,8 @@ autotools_stage_all() {
212 fi 217 fi
213 rm -rf ${STAGE_TEMP}/${mandir} || true 218 rm -rf ${STAGE_TEMP}/${mandir} || true
214 rm -rf ${STAGE_TEMP}/${infodir} || true 219 rm -rf ${STAGE_TEMP}/${infodir} || true
215 # This will remove an empty directory so we can ignore it 220 autotools_stage_dir ${STAGE_TEMP}/${datadir} ${STAGING_DATADIR}
216 rmdir ${STAGE_TEMP}/${datadir} || true 221 #rm -rf ${STAGE_TEMP}
217 if [ -d ${STAGE_TEMP}/${datadir} ]; then
218 install -d ${STAGING_DATADIR}/
219 cp -fpPR ${STAGE_TEMP}/${datadir}/* ${STAGING_DATADIR}/
220 fi
221 rm -rf ${STAGE_TEMP}
222} 222}
223 223
224EXPORT_FUNCTIONS do_configure do_install 224EXPORT_FUNCTIONS do_configure do_install