autotools.bbclass, base.bbclass: modify autotools_stage_all to use oe_libinstall...
authorPhilipp Zabel <philipp.zabel@gmail.com>
Mon, 26 Dec 2005 09:57:00 +0000 (09:57 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Mon, 26 Dec 2005 09:57:00 +0000 (09:57 +0000)
classes/autotools.bbclass
classes/base.bbclass

index 8d448ce..49d9961 100644 (file)
@@ -151,15 +151,32 @@ autotools_stage_includes() {
 }
 
 autotools_stage_all() {
-       if [ "${INHIBIT_AUTO_STAGE}" != "1" ]
+       if [ "${INHIBIT_AUTO_STAGE}" = "1" ]
        then
-               rm -rf ${STAGE_TEMP}
-               mkdir -p ${STAGE_TEMP}
-               oe_runmake DESTDIR="${STAGE_TEMP}" install
+               return
+       fi
+       rm -rf ${STAGE_TEMP}
+       mkdir -p ${STAGE_TEMP}
+       oe_runmake DESTDIR="${STAGE_TEMP}" install
+       if [ -d ${STAGE_TEMP}/${includedir} ]; then
                cp -pPR ${STAGE_TEMP}/${includedir}/* ${STAGING_INCDIR}
-               cp -pPR ${STAGE_TEMP}/${libdir}/* ${STAGING_LIBDIR}
-               rm -rf ${STAGE_TEMP}
        fi
+       if [ -d ${STAGE_TEMP}/${libdir} ]
+       then
+               for i in ${STAGE_TEMP}/${libdir}/*.la
+               do
+                       if [ ! -f "$i" ]; then
+                               cp -pPR ${STAGE_TEMP}/${libdir}/* ${STAGING_LIBDIR}
+                               break
+                       fi
+                       oe_libinstall -a -so $(basename $i .la) ${STAGING_LIBDIR}
+               done
+       fi
+       if [ -d ${STAGE_TEMP}/${datadir}/aclocal ]; then
+               install -d ${STAGING_DATADIR}/aclocal
+               cp -pPR ${STAGE_TEMP}/${datadir}/aclocal/* ${STAGING_DATADIR}/aclocal
+       fi
+       rm -rf ${STAGE_TEMP}
 }
 
 EXPORT_FUNCTIONS do_configure do_install
index c5359b2..b0ca935 100644 (file)
@@ -171,9 +171,8 @@ oe_libinstall() {
        if [ -z "$dir" ]; then
                dir=`pwd`
        fi
-       if [ -d "$dir/.libs" ]; then
-               dir=$dir/.libs
-       fi
+       dotlai=$libname.lai
+       dir=$dir`(cd $dir; find -name "$dotlai") | sed "s/^\.//;s/\/$dotlai\$//;q"`
        olddir=`pwd`
        __runcmd cd $dir
 
@@ -191,7 +190,6 @@ oe_libinstall() {
        if [ -f "$dota" -o -n "$require_static" ]; then
                __runcmd install -m 0644 $dota $destpath/
        fi
-       dotlai=$libname.lai
        if [ -f "$dotlai" -a -n "$libtool" ]; then
                if test -n "$staging_install"
                then