Patchwork [14/16] autotools.bbclass: Make builds deterministic

login
register
mail settings
Submitter Richard Purdie
Date Feb. 23, 2012, 1:38 p.m.
Message ID <b46a7264aa65f80e9b48154a8d15e759e351736f.1330004039.git.richard.purdie@linuxfoundation.org>
Download mbox | patch
Permalink /patch/21741/
State Accepted
Commit 673e2a05013cbe08efde936f663845031025689d
Headers show

Comments

Richard Purdie - Feb. 23, 2012, 1:38 p.m.
We need to ensure any aclocal-copy directory is removed before we s
earch for .m4 files, else the locations .m4 files are found from can
vary depending on whether its the first or second time we run configure.

Clearing any existing aclocal-copy directory before we start resolves
this issue and makes builds deterministic again.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/autotools.bbclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Patch

diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 5d74333..4db021b 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -102,6 +102,8 @@  autotools_do_configure() {
 		if [ -e ${S}/configure.in -o -e ${S}/configure.ac ]; then
 			olddir=`pwd`
 			cd ${S}
+			# Remove any previous copy of the m4 macros
+			rm -rf ${B}/aclocal-copy/
 			if [ x"${acpaths}" = xdefault ]; then
 				acpaths=
 				for i in `find ${S} -maxdepth 2 -name \*.m4|grep -v 'aclocal.m4'| \