summaryrefslogtreecommitdiffstats
path: root/meta/classes/autotools.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-11-02 17:10:51 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-11-13 12:15:22 +0000
commit6ea78d648951e5bbe9669412c0863daaf7f49ca5 (patch)
tree85d8442493787783cb1ad08659f38ca2ccd32cc2 /meta/classes/autotools.bbclass
parent1383f0fb4ccae5622439e2eb02711c57aa2b4c24 (diff)
downloadpoky-6ea78d648951e5bbe9669412c0863daaf7f49ca5.tar.gz
autotools.bbclass: Separate out useful staging functions into base.bbclass and call from autotools classes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/classes/autotools.bbclass')
-rw-r--r--meta/classes/autotools.bbclass49
1 files changed, 4 insertions, 45 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 5ddf8baa07..bd88184a74 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -170,34 +170,11 @@ autotools_stage_includes() {
170} 170}
171 171
172autotools_stage_dir() { 172autotools_stage_dir() {
173 from="$1" 173 sysroot_stage_dir $1 ${STAGE_TEMP_PREFIX}$2
174 to="$2"
175 prefix="${STAGE_TEMP_PREFIX}"
176 # This will remove empty directories so we can ignore them
177 rmdir "$from" 2> /dev/null || true
178 if [ -d "$from" ]; then
179 mkdir -p "$prefix$to"
180 cp -fpPR "$from"/* "$prefix$to"
181 fi
182} 174}
183 175
184autotools_stage_libdir() { 176autotools_stage_libdir() {
185 from="$1" 177 sysroot_stage_libdir $1 ${STAGE_TEMP_PREFIX}$2
186 to="$2"
187
188 olddir=`pwd`
189 cd $from
190 las=$(find . -name \*.la -type f)
191 cd $olddir
192 echo "Found la files: $las"
193 for i in $las
194 do
195 sed -e 's/^installed=yes$/installed=no/' \
196 -e '/^dependency_libs=/s,${WORKDIR}[[:alnum:]/\._+-]*/\([[:alnum:]\._+-]*\),${STAGING_LIBDIR}/\1,g' \
197 -e "/^dependency_libs=/s,\([[:space:]']\)${libdir},\1${STAGING_LIBDIR},g" \
198 -i $from/$i
199 done
200 autotools_stage_dir $from $to
201} 178}
202 179
203 180
@@ -209,26 +186,8 @@ autotools_stage_all() {
209 rm -rf ${STAGE_TEMP} 186 rm -rf ${STAGE_TEMP}
210 mkdir -p ${STAGE_TEMP} 187 mkdir -p ${STAGE_TEMP}
211 oe_runmake DESTDIR="${STAGE_TEMP}" install 188 oe_runmake DESTDIR="${STAGE_TEMP}" install
212 autotools_stage_dir ${STAGE_TEMP}/${includedir} ${STAGING_INCDIR} 189
213 if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then 190 sysroot_stage_dirs ${STAGE_TEMP} ${STAGE_TEMP_PREFIX}
214 autotools_stage_dir ${STAGE_TEMP}/${bindir} ${STAGING_DIR_HOST}${bindir}
215 autotools_stage_dir ${STAGE_TEMP}/${sbindir} ${STAGING_DIR_HOST}${sbindir}
216 autotools_stage_dir ${STAGE_TEMP}/${base_bindir} ${STAGING_DIR_HOST}${base_bindir}
217 autotools_stage_dir ${STAGE_TEMP}/${base_sbindir} ${STAGING_DIR_HOST}${base_sbindir}
218 autotools_stage_dir ${STAGE_TEMP}/${libexecdir} ${STAGING_DIR_HOST}${libexecdir}
219 fi
220 if [ -d ${STAGE_TEMP}/${libdir} ]
221 then
222 autotools_stage_libdir ${STAGE_TEMP}/${libdir} ${STAGING_LIBDIR}
223 fi
224 if [ -d ${STAGE_TEMP}/${base_libdir} ]
225 then
226 autotools_stage_libdir ${STAGE_TEMP}/${base_libdir} ${STAGING_DIR_HOST}${base_libdir}
227 fi
228 rm -rf ${STAGE_TEMP}/${mandir} || true
229 rm -rf ${STAGE_TEMP}/${infodir} || true
230 autotools_stage_dir ${STAGE_TEMP}/${datadir} ${STAGING_DATADIR}
231 #rm -rf ${STAGE_TEMP}
232} 191}
233 192
234EXPORT_FUNCTIONS do_configure do_install 193EXPORT_FUNCTIONS do_configure do_install