diff mbox series

[4/4] autotools: remove deletion of aclocal.m4

Message ID 20260225123727.2043715-4-ross.burton@arm.com
State New
Headers show
Series [1/4] readline: improve aclocal.m4 handling | expand

Commit Message

Ross Burton Feb. 25, 2026, 12:37 p.m. UTC
We've historically[1] deleted any aclocal.m4 file in the source tree
before autoreconfing on the grounds that it is "too shy" to overwrite
aclocal.m4, so we forcibly delete the aclocal.m4 unless aclocal has been
excluded in autoreconf.

However, this shyness has been removed in autoconf 2.70[2] and autoreconf
will always call aclocal, which will rewrite the file if needed.

So, remove the explicit deletion of aclocal.m4.  I've verified that a
build of all recipes in core that use autotools have identical
aclocal.m4 files before and after this change.

[1] This code appears in oe-classic during 2011 but originated in a
    BitKeeper commit, so predates our use of git.

[2] autoconf bc7e12e7 ("autoreconf: drop support for old (< 1.8) aclocal versions")

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/classes-recipe/autotools.bbclass | 7 -------
 1 file changed, 7 deletions(-)
diff mbox series

Patch

diff --git a/meta/classes-recipe/autotools.bbclass b/meta/classes-recipe/autotools.bbclass
index bd477dc60f0..bf580086698 100644
--- a/meta/classes-recipe/autotools.bbclass
+++ b/meta/classes-recipe/autotools.bbclass
@@ -166,13 +166,6 @@  autotools_do_configure() {
 		cd ${AUTOTOOLS_SCRIPT_PATH}
 		# aclocal looks in the native sysroot by default, so tell it to also look in the target sysroot.
 		ACLOCAL="aclocal --aclocal-path=${STAGING_DATADIR}/aclocal/"
-		# autoreconf is too shy to overwrite aclocal.m4 if it doesn't look
-		# like it was auto-generated.  Work around this by blowing it away
-		# by hand, unless the package specifically asked not to run aclocal.
-		if ! echo ${EXTRA_AUTORECONF} | grep -q "aclocal"; then
-			bbnote Removing existing aclocal.m4
-			rm -f aclocal.m4
-		fi
 		if [ -e configure.in ]; then
 			CONFIGURE_AC=configure.in
 		else