[oe-commits] Chris Larson : autotools.bbclass: First pass of cleanups, switch from grep to autoconf tracing.
GIT User account
git at amethyst.openembedded.net
Wed Apr 1 23:59:15 UTC 2009
Module: openembedded.git
Branch: kergoth/autotools
Commit: 7eecbeb3daa7a5c23bec2a9dba44a112b2567733
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=7eecbeb3daa7a5c23bec2a9dba44a112b2567733
Author: Chris Larson <clarson at mvista.com>
Date: Fri Mar 27 13:19:43 2009 -0700
autotools.bbclass: First pass of cleanups, switch from grep to autoconf tracing.
- Kill unnecessary automake version output, and unnecessary echo.
- Go into subdirs with the intltool and glib-gettext bits.
- Use autoconf tracing rather than grep to check for macros.
- Ditch gnu-configize in favor of copies in the class via autoconf
tracing. Also only installs them when AC_CANONICAL_BUILD is defined, as
they aren't necessary when it isn't.
- Kill the unnecessary mkdir of an m4 directory.
Signed-off-by: Chris Larson <clarson at mvista.com>
---
classes/autotools.bbclass | 50 +++++++++++++++++++++++++-------------------
1 files changed, 28 insertions(+), 22 deletions(-)
diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass
index 2ffc671..0172a27 100644
--- a/classes/autotools.bbclass
+++ b/classes/autotools.bbclass
@@ -98,8 +98,6 @@ autotools_do_configure() {
acpaths="${acpaths}"
fi
AUTOV=`automake --version |head -n 1 |sed "s/.* //;s/\.[0-9]\+$//"`
- automake --version
- echo "AUTOV is $AUTOV"
install -d ${STAGING_DATADIR}/aclocal
install -d ${STAGING_DATADIR}/aclocal-$AUTOV
acpaths="$acpaths -I ${STAGING_DATADIR_NATIVE}/autoconf -I ${STAGING_DATADIR_NATIVE}/aclocal -I ${STAGING_DATADIR}/aclocal-$AUTOV -I ${STAGING_DATADIR}/aclocal"
@@ -123,26 +121,34 @@ autotools_do_configure() {
if ! echo ${EXTRA_AUTORECONF} | grep -q "aclocal"; then
rm -f aclocal.m4
fi
- if [ -e configure.in ]; then
- CONFIGURE_AC=configure.in
- else
- CONFIGURE_AC=configure.ac
- fi
- if grep "^AM_GLIB_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
- if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then
- : do nothing -- we still have an old unmodified configure.ac
- else
- oenote Executing glib-gettextize --force --copy
- echo "no" | glib-gettextize --force --copy
- fi
- fi
- if grep "^[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
- oenote Executing intltoolize --copy --force --automake
- intltoolize --copy --force --automake
- fi
- oenote Executing autoreconf --verbose --install --force ${EXTRA_AUTORECONF} $acpaths
- mkdir -p m4
- autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || oefatal "autoreconf execution failed."
+
+ subdirs="`autoconf -t AC_CONFIG_SUBDIRS|cut -d: -f4`"
+ for dir in $subdirs .; do
+ if [ ! -e "${S}/$dir" ]; then
+ continue
+ fi
+
+ cd ${S}/$dir
+ if [ -n "`autoconf -t AM_GLIB_GNU_GETTEXT`" ]; then
+ oenote Executing glib-gettextize --force --copy
+ echo "no" | glib-gettextize --force --copy
+ fi
+ if [ -n "`autoconf -t AC_PROG_INTLTOOL -t IT_PROG_INTLTOOL`" ]; then
+ oenote Executing intltoolize --copy --force --automake
+ intltoolize --copy --force --automake
+ fi
+ if [ -n "`autoconf -t AC_CANONICAL_BUILD`" ]; then
+ macrodir="`autoconf -t AC_CONFIG_MACRO_DIR|cut -d: -f4`"
+ if [ -z "$macrodir" ]; then
+ macrodir="."
+ fi
+ ln -sf ${STAGING_DATADIR_NATIVE}/automake-$AUTOV/config.sub $macrodir/config.sub
+ ln -sf ${STAGING_DATADIR_NATIVE}/automake-$AUTOV/config.guess $macrodir/config.guess
+ fi
+ done
+
+ oenote Executing autoreconf --install ${EXTRA_AUTORECONF} $acpaths
+ autoreconf --install ${EXTRA_AUTORECONF} $acpaths || oefatal "autoreconf execution failed."
cd $olddir
fi
;;
More information about the Openembedded-commits
mailing list