]> code.ossystems Code Review - openembedded-core.git/commitdiff
autotools: Use make clean for builds not supporting B != S
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 24 Oct 2014 14:15:50 +0000 (15:15 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 30 Oct 2014 13:03:54 +0000 (13:03 +0000)
If the build doesn't support B != S, we can try running "make clean" instead
to try and clean up previous objects if the hash for the task has changed.

This tries to ensure that when variables like ${baselib} change, the changes are
correctly accounted for.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/autotools.bbclass

index 6b99bddd5dd0fd9c33e79009ca1c1507e1bccfa1..bed8a835d41340fb82fa46ca956d16d03df19329 100644 (file)
@@ -109,7 +109,11 @@ autotools_preconfigure() {
                        else
                                # At least remove the .la files since automake won't automatically
                                # regenerate them even if CFLAGS/LDFLAGS are different
-                               cd ${S}; find ${S} -name \*.la -delete
+                               cd ${S}
+                               if [ -e Makefile -o -e makefile -o -e GNUmakefile ]; then
+                                       ${MAKE} clean
+                               fi
+                               find ${S} -name \*.la -delete
                        fi
                fi
        fi