[oe] [PATCH] autotools.bbclass: enhanced oe_runconf() to accept quoted arguments
Paul Menzel
paulepanter at users.sourceforge.net
Tue Mar 16 12:10:32 UTC 2010
Am Dienstag, den 16.03.2010, 12:42 +0100 schrieb Enrico Scholz:
> This patch allows to pass quoted strings in EXTRA_OECONF. E.g. with
> this patch, it is possible to do
>
> | EXTRA_OECONF = "--with-build-cflags='${BUILD_CFLAGS}'"
>
> where 'BUILD_CFLAGS' contains multiple, whitespace separated arguments.
>
> Such flags can be also passed to oe_runconf() directly:
>
> | oe_runconf --with-build-cflags="${BUILD_CFLAGS}"
>
> This patch might create incompatibilities for recipes which workaround the
> current limitations.
>
> As a sideeffect, 'set -x' debug output is now much nicer because
> superflous whitespaces in the configure call are removed.
Why did not it work before? (Sorry, I do not know much about shell
scripting.)
> Signed-off-by: Enrico Scholz <enrico.scholz at sigma-chemnitz.de>
> ---
> classes/autotools.bbclass | 11 +++++------
> 1 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass
> index c53583b..508bd58 100644
> --- a/classes/autotools.bbclass
> +++ b/classes/autotools.bbclass
> @@ -40,7 +40,7 @@ def autotools_set_crosscompiling(d):
>
> oe_runconf () {
> if [ -x ${S}/configure ] ; then
> - cfgcmd="${S}/configure \
> + set -- ${S}/configure \
> --build=${BUILD_SYS} \
> --host=${HOST_SYS} \
> --target=${TARGET_SYS} \
> @@ -57,11 +57,10 @@ oe_runconf () {
> --includedir=${includedir} \
> --oldincludedir=${oldincludedir} \
> --infodir=${infodir} \
> - --mandir=${mandir} \
> - ${EXTRA_OECONF} \
> - $@"
> - oenote "Running $cfgcmd..."
> - $cfgcmd || oefatal "oe_runconf failed"
> + --mandir=${mandir} \
You added a white space before the »\« so the diff is bigger as needed.
> + ${EXTRA_OECONF} "$@"
> + oenote "Running $*..."
> + "$@" || oefatal "oe_runconf failed"
> else
> oefatal "no configure script found"
> fi
Thanks,
Paul
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20100316/88f542ae/attachment-0002.sig>
More information about the Openembedded-devel
mailing list