]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
autotools: don't try and find in-tree macros
authorRoss Burton <ross.burton@arm.com>
Tue, 25 Feb 2025 14:26:33 +0000 (14:26 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 27 Feb 2025 10:47:09 +0000 (10:47 +0000)
autotools has improved a lot since this class was written, and there's
now no need to search the source tree for m4 files and add them to the
include path.

If packages have macros in subdirectories the idiom is to tell aclocal
via an assignment in Makefile.am:

  ACLOCAL_AMFLAGS = -I gl/m4 -I m4

If, for example, a package isn't autoreconfable out of the box (because
it has a non-trivial autogen.sh or similar, say) then the required -I
statements can be added to EXTRA_AUTORECONF.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/autotools.bbclass

index e33eae7d4860e93e7065ae0067923bd34664bf6e..bffd8a7a057d213cb9583efcea59ee89e0518b42 100644 (file)
@@ -36,7 +36,6 @@ inherit siteinfo
 # the contents of the sysroot.
 export CONFIG_SITE
 
-acpaths ?= "default"
 EXTRA_AUTORECONF += "--exclude=autopoint"
 
 export lt_cv_sys_lib_dlsearch_path_spec = "${libdir} ${base_libdir}"
@@ -167,15 +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/"
-               if [ x"${acpaths}" = xdefault ]; then
-                       acpaths=
-                       for i in `find ${AUTOTOOLS_SCRIPT_PATH} -ignore_readdir_race -maxdepth 2 -name \*.m4|grep -v 'aclocal.m4'| \
-                               grep -v 'acinclude.m4' | sed -e 's,\(.*/\).*$,\1,'|sort -u`; do
-                               acpaths="$acpaths -I $i"
-                       done
-               else
-                       acpaths="${acpaths}"
-               fi
                # 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.
@@ -212,8 +202,8 @@ autotools_do_configure() {
                        find ${S} -ignore_readdir_race -name $i -delete
                done
 
-               bbnote Executing ACLOCAL=\"$ACLOCAL\" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
-               ACLOCAL="$ACLOCAL" autoreconf -Wcross -Wno-obsolete --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || die "autoreconf execution failed."
+               bbnote Executing ACLOCAL=\"$ACLOCAL\" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF}
+               ACLOCAL="$ACLOCAL" autoreconf -Wcross -Wno-obsolete --verbose --install --force ${EXTRA_AUTORECONF} || die "autoreconf execution failed."
                cd $olddir
        fi
        if [ -e ${CONFIGURE_SCRIPT} ]; then