mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
autotools: Allow recipe-individual configure scripts
OpenJDK-8 has it's configure script at common/autotools - which will cause
the entire assumption of ${S}/configure is regenerated by autoreconf, intltoolize or alike
fails heavily.
Also - other configure mechanisms can be supported more similar (see how pkgsrc
manages different ones ...)
(From OE-Core rev: fe506eddb0790e37ac1e50f37fa2e32ad81d5493)
Signed-off-by: Jens Rehsack <sno@netbsd.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
e28179101c
commit
753f31e3d1
@@ -77,16 +77,20 @@ CONFIGUREOPTS = " --build=${BUILD_SYS} \
|
|||||||
${@append_libtool_sysroot(d)}"
|
${@append_libtool_sysroot(d)}"
|
||||||
CONFIGUREOPT_DEPTRACK ?= "--disable-dependency-tracking"
|
CONFIGUREOPT_DEPTRACK ?= "--disable-dependency-tracking"
|
||||||
|
|
||||||
|
AUTOTOOLS_SCRIPT_PATH ?= "${S}"
|
||||||
|
CONFIGURE_SCRIPT ?= "${AUTOTOOLS_SCRIPT_PATH}/configure"
|
||||||
|
|
||||||
|
AUTOTOOLS_AUXDIR ?= "${AUTOTOOLS_SCRIPT_PATH}"
|
||||||
|
|
||||||
oe_runconf () {
|
oe_runconf () {
|
||||||
cfgscript="${S}/configure"
|
cfgscript="${CONFIGURE_SCRIPT}"
|
||||||
if [ -x "$cfgscript" ] ; then
|
if [ -x "$cfgscript" ] ; then
|
||||||
bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
|
bbnote "Running $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} $@"
|
||||||
set +e
|
set +e
|
||||||
${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"
|
${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} ${EXTRA_OECONF} "$@"
|
||||||
if [ "$?" != "0" ]; then
|
if [ "$?" != "0" ]; then
|
||||||
echo "Configure failed. The contents of all config.log files follows to aid debugging"
|
echo "Configure failed. The contents of all config.log files follows to aid debugging"
|
||||||
find ${S} -ignore_readdir_race -name config.log -print -exec cat {} \;
|
find ${B} -ignore_readdir_race -name config.log -print -exec cat {} \;
|
||||||
die "oe_runconf failed"
|
die "oe_runconf failed"
|
||||||
fi
|
fi
|
||||||
set -e
|
set -e
|
||||||
@@ -95,8 +99,6 @@ oe_runconf () {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
AUTOTOOLS_AUXDIR ?= "${S}"
|
|
||||||
|
|
||||||
CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"
|
CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"
|
||||||
|
|
||||||
autotools_preconfigure() {
|
autotools_preconfigure() {
|
||||||
@@ -134,7 +136,7 @@ do_configure[postfuncs] += "autotools_postconfigure"
|
|||||||
ACLOCALDIR = "${B}/aclocal-copy"
|
ACLOCALDIR = "${B}/aclocal-copy"
|
||||||
|
|
||||||
python autotools_copy_aclocals () {
|
python autotools_copy_aclocals () {
|
||||||
s = d.getVar("S", True)
|
s = d.getVar("AUTOTOOLS_SCRIPT_PATH", True)
|
||||||
if not os.path.exists(s + "/configure.in") and not os.path.exists(s + "/configure.ac"):
|
if not os.path.exists(s + "/configure.in") and not os.path.exists(s + "/configure.ac"):
|
||||||
if not d.getVar("AUTOTOOLS_COPYACLOCAL", False):
|
if not d.getVar("AUTOTOOLS_COPYACLOCAL", False):
|
||||||
return
|
return
|
||||||
@@ -228,13 +230,13 @@ autotools_do_configure() {
|
|||||||
( for ac in `find ${S} -ignore_readdir_race -name configure.in -o -name configure.ac`; do
|
( for ac in `find ${S} -ignore_readdir_race -name configure.in -o -name configure.ac`; do
|
||||||
rm -f `dirname $ac`/configure
|
rm -f `dirname $ac`/configure
|
||||||
done )
|
done )
|
||||||
if [ -e ${S}/configure.in -o -e ${S}/configure.ac ]; then
|
if [ -e ${AUTOTOOLS_SCRIPT_PATH}/configure.in -o -e ${AUTOTOOLS_SCRIPT_PATH}/configure.ac ]; then
|
||||||
olddir=`pwd`
|
olddir=`pwd`
|
||||||
cd ${S}
|
cd ${AUTOTOOLS_SCRIPT_PATH}
|
||||||
ACLOCAL="aclocal --system-acdir=${ACLOCALDIR}/"
|
ACLOCAL="aclocal --system-acdir=${ACLOCALDIR}/"
|
||||||
if [ x"${acpaths}" = xdefault ]; then
|
if [ x"${acpaths}" = xdefault ]; then
|
||||||
acpaths=
|
acpaths=
|
||||||
for i in `find ${S} -ignore_readdir_race -maxdepth 2 -name \*.m4|grep -v 'aclocal.m4'| \
|
for i in `find ${AUTOTOOLS_SCRIPT_PATH} -ignore_readdir_race -maxdepth 2 -name \*.m4|grep -v 'aclocal.m4'| \
|
||||||
grep -v 'acinclude.m4' | grep -v 'aclocal-copy' | sed -e 's,\(.*/\).*$,\1,'|sort -u`; do
|
grep -v 'acinclude.m4' | grep -v 'aclocal-copy' | sed -e 's,\(.*/\).*$,\1,'|sort -u`; do
|
||||||
acpaths="$acpaths -I $i"
|
acpaths="$acpaths -I $i"
|
||||||
done
|
done
|
||||||
@@ -265,21 +267,20 @@ autotools_do_configure() {
|
|||||||
bbnote Executing glib-gettextize --force --copy
|
bbnote Executing glib-gettextize --force --copy
|
||||||
echo "no" | glib-gettextize --force --copy
|
echo "no" | glib-gettextize --force --copy
|
||||||
fi
|
fi
|
||||||
else if grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
|
elif grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then
|
||||||
# We'd call gettextize here if it wasn't so broken...
|
# We'd call gettextize here if it wasn't so broken...
|
||||||
cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
|
cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/
|
||||||
if [ -d ${S}/po/ ]; then
|
if [ -d ${S}/po/ ]; then
|
||||||
cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po/
|
cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po/
|
||||||
if [ ! -e ${S}/po/remove-potcdate.sin ]; then
|
if [ ! -e ${S}/po/remove-potcdate.sin ]; then
|
||||||
cp ${STAGING_DATADIR_NATIVE}/gettext/po/remove-potcdate.sin ${S}/po/
|
cp ${STAGING_DATADIR_NATIVE}/gettext/po/remove-potcdate.sin ${S}/po/
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
for i in gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4; do
|
|
||||||
for j in `find ${S} -ignore_readdir_race -name $i | grep -v aclocal-copy`; do
|
|
||||||
rm $j
|
|
||||||
done
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
for i in gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4; do
|
||||||
|
for j in `find ${S} -ignore_readdir_race -name $i | grep -v aclocal-copy`; do
|
||||||
|
rm $j
|
||||||
|
done
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
mkdir -p m4
|
mkdir -p m4
|
||||||
if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
|
if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then
|
||||||
@@ -290,7 +291,7 @@ autotools_do_configure() {
|
|||||||
ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || die "autoreconf execution failed."
|
ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || die "autoreconf execution failed."
|
||||||
cd $olddir
|
cd $olddir
|
||||||
fi
|
fi
|
||||||
if [ -e ${S}/configure ]; then
|
if [ -e ${CONFIGURE_SCRIPT} ]; then
|
||||||
oe_runconf
|
oe_runconf
|
||||||
else
|
else
|
||||||
bbnote "nothing to configure"
|
bbnote "nothing to configure"
|
||||||
|
|||||||
Reference in New Issue
Block a user