Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id A084BE00D40; Thu, 1 Oct 2015 11:04:50 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (rehsack[at]gmail.com) * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.212.170 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's * domain * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 3C4B8E00B6C for ; Thu, 1 Oct 2015 11:04:45 -0700 (PDT) Received: by wiclk2 with SMTP id lk2so2273334wic.0 for ; Thu, 01 Oct 2015 11:04:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version; bh=P45S8PRItGs626kR3b6WhZSnsKxelUoYsfnwME6zXHY=; b=LQyJga8n1Cltd6yufoJ2E63ATmsNI7nGDhS2vJWPeYJ5RhIpD/7IWzD14zLoIhAM3P 6K9Xvn5Odk8GdnwDGAwzmTRlq752OUwU/yYyTm9nmiXV1SILCY2TcfXSsBXBZuFpKEwG 4pqTQBngSHIVTL5lk4if84ETVl+tRqKNYHu/ShVABrXdyn/fTOCQAP+mcWVwqmyeldBB c0TOxQy6FzrhcBs4CVdzRmsS5Xfo1zklbT6MlqrCXqT7EYrPwcJHpHX0ZoQzalTPvG5N KivQ+KU5s4Kl2iGwD/UVStX1xwbJmuvsqYwxIiL8NG4hmaSd/vbmghXrJsmINJaqk493 9Zvg== X-Received: by 10.180.36.193 with SMTP id s1mr142984wij.84.1443722685034; Thu, 01 Oct 2015 11:04:45 -0700 (PDT) Received: from ernie.rdm.local (rademacherexchange.de. [46.245.221.222]) by smtp.gmail.com with ESMTPSA id jf3sm4352813wic.8.2015.10.01.11.04.44 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 01 Oct 2015 11:04:44 -0700 (PDT) From: Jens Rehsack Message-Id: Date: Thu, 1 Oct 2015 20:04:44 +0200 To: poky@yoctoproject.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) X-Mailer: Apple Mail (2.2104) Subject: [PATCH 5/9] Allow recipe-individual configure scripts X-BeenThere: poky@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Poky build system developer discussion & patch submission for meta-yocto List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Oct 2015 18:04:50 -0000 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable 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 ...) Signed-off-by: Jens Rehsack --- meta/classes/autotools.bbclass | 46 = +++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/meta/classes/autotools.bbclass = b/meta/classes/autotools.bbclass index 078f58f..565baf0 100644 --- a/meta/classes/autotools.bbclass +++ b/meta/classes/autotools.bbclass @@ -77,17 +77,21 @@ CONFIGUREOPTS =3D " --build=3D${BUILD_SYS} \ ${@append_libtool_sysroot(d)}" CONFIGUREOPT_DEPTRACK ?=3D "--disable-dependency-tracking" =20 +AUTOTOOLS_SCRIPT_PATH ?=3D "${S}" +CONFIGURE_SCRIPT ?=3D "${AUTOTOOLS_SCRIPT_PATH}/configure" + +AUTOTOOLS_AUXDIR ?=3D "${AUTOTOOLS_SCRIPT_PATH}" =20 oe_runconf () { - cfgscript=3D"${S}/configure" + cfgscript=3D"${CONFIGURE_SCRIPT}" if [ -x "$cfgscript" ] ; then bbnote "Running $cfgscript ${CONFIGUREOPTS} = ${EXTRA_OECONF} $@" set +e ${CACHED_CONFIGUREVARS} $cfgscript ${CONFIGUREOPTS} = ${EXTRA_OECONF} "$@" if [ "$?" !=3D "0" ]; then 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 {} \; - die "oe_runconf failed" + find ${B} -ignore_readdir_race -name config.log = -print -exec cat {} \; + bbfatal "oe_runconf failed" fi set -e else @@ -95,8 +99,6 @@ oe_runconf () { fi } =20 -AUTOTOOLS_AUXDIR ?=3D "${S}" - CONFIGURESTAMPFILE =3D "${WORKDIR}/configure.sstate" =20 autotools_preconfigure() { @@ -135,6 +137,9 @@ ACLOCALDIR =3D "${B}/aclocal-copy" =20 python autotools_copy_aclocals () { s =3D d.getVar("S", True) + cfg_script =3D d.getVar("CONFIGURE_SCRIPT", True) + if os.path.dirname(cfg_script) !=3D ".": + s =3D os.path.dirname(cfg_script) if not os.path.exists(s + "/configure.in") and not os.path.exists(s = + "/configure.ac"): if not d.getVar("AUTOTOOLS_COPYACLOCAL", False): return @@ -228,13 +233,13 @@ autotools_do_configure() { ( for ac in `find ${S} -ignore_readdir_race -name configure.in = -o -name configure.ac`; do rm -f `dirname $ac`/configure 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=3D`pwd` - cd ${S} + cd ${AUTOTOOLS_SCRIPT_PATH} ACLOCAL=3D"aclocal --system-acdir=3D${ACLOCALDIR}/" if [ x"${acpaths}" =3D xdefault ]; then acpaths=3D - 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 acpaths=3D"$acpaths -I $i" done @@ -265,21 +270,20 @@ autotools_do_configure() { bbnote Executing glib-gettextize --force = --copy echo "no" | glib-gettextize --force = --copy 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... - cp = ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/ - if [ -d ${S}/po/ ]; then - cp -f = ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po/ - if [ ! -e = ${S}/po/remove-potcdate.sin ]; then - cp = ${STAGING_DATADIR_NATIVE}/gettext/po/remove-potcdate.sin ${S}/po/ - fi + cp = ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${AUTOTOOLS_AUXDIR}/ + if [ -d ${S}/po/ ]; then + cp -f = ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po/ + if [ ! -e ${S}/po/remove-potcdate.sin ]; = then + cp = ${STAGING_DATADIR_NATIVE}/gettext/po/remove-potcdate.sin ${S}/po/ 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 + 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 mkdir -p m4 if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" = $CONFIGURE_AC >/dev/null; then @@ -290,7 +294,7 @@ autotools_do_configure() { ACLOCAL=3D"$ACLOCAL" autoreconf -Wcross --verbose = --install --force ${EXTRA_AUTORECONF} $acpaths || die "autoreconf = execution failed." cd $olddir fi - if [ -e ${S}/configure ]; then + if [ -e ${CONFIGURE_SCRIPT} ]; then oe_runconf else bbnote "nothing to configure" --=20 1.9.1 --=20 Jens Rehsack - rehsack@gmail.com