[oe] [PATCH 3/4] autotools: add INHIBIT_AUTOTOOLS_BOOTSTRAP

Khem Raj raj.khem at gmail.com
Wed Feb 16 22:24:30 UTC 2011


On (16/02/11 15:07), Chris Larson wrote:
> From: Chris Larson <chris_larson at mentor.com>
> 
> Setting this variable to a true value (obeying the semantics of the 'boolean'
> type in oe.types) will result in not running autoreconf, and not depending on
> the things which the autoreconf requires.  Note that the
> config.guess/config.sub files are still updated when using
> INHIBIT_AUTOTOOLS_BOOTSTRAP, and these are updated directly via a find+ln
> rather than through gnu-configize usage in order to avoid the dependency upon
> autoconf/automake (gnu-configize is included with gnu-config, but requires the
> perl modules from the other recipes).
> 
> Signed-off-by: Chris Larson <chris_larson at mentor.com>

Acked-by: Khem Raj <raj.khem at gmail.com>

> ---
>  classes/autotools.bbclass |   29 ++++++++++++++++++++++-------
>  1 files changed, 22 insertions(+), 7 deletions(-)
> 
> diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass
> index 3c124ae..dd52e03 100644
> --- a/classes/autotools.bbclass
> +++ b/classes/autotools.bbclass
> @@ -2,26 +2,31 @@ require classes/autotools/staging.inc
>  require classes/autotools/bootstrap.inc
>  require classes/autotools/configure.inc
>  
> +INHIBIT_AUTOTOOLS_BOOTSTRAP ?= "false"
> +INHIBIT_AUTOTOOLS_BOOTSTRAP[type] = "boolean"
> +
>  def autotools_deps(d):
>      if bb.data.getVar('INHIBIT_AUTOTOOLS_DEPS', d, 1):
>          return ''
>  
> -    pn = bb.data.getVar('PN', d, 1)
> -    deps = ''
> +    deps = 'gnu-config-native'
> +    if oe.data.typed_value('INHIBIT_AUTOTOOLS_BOOTSTRAP', d):
> +        return deps
>  
> +    pn = bb.data.getVar('PN', d, 1)
>      if pn in ['autoconf-native', 'automake-native', 'help2man-native']:
>          return deps
>  
> -    deps += 'autoconf-native automake-native help2man-native '
> +    deps += ' autoconf-native automake-native help2man-native'
>  
>      if pn not in ['libtool', 'libtool-native', 'libtool-cross']:
> -        deps += 'libtool-native '
> +        deps += ' libtool-native'
>          if (not oe.utils.inherits(d, 'native', 'nativesdk', 'cross',
>                                    'sdk') and
>              not d.getVar('INHIBIT_DEFAULT_DEPS', True)):
> -            deps += 'libtool-cross '
> +            deps += ' libtool-cross'
>  
> -    return deps + ' gnu-config-native'
> +    return deps
>  
>  AUTOTOOLS_DEPENDS = "${@autotools_deps(d)}"
>  
> @@ -29,8 +34,18 @@ DEPENDS_prepend = "${AUTOTOOLS_DEPENDS} "
>  DEPENDS_virtclass-native_prepend = "${AUTOTOOLS_DEPENDS} "
>  DEPENDS_virtclass-nativesdk_prepend = "${AUTOTOOLS_DEPENDS} "
>  
> +_INHIBITED = "${@base_ifelse(oe.data.typed_value('INHIBIT_AUTOTOOLS_BOOTSTRAP', \
> +                                                 d), \
> +                             'y', 'n')}"
>  autotools_do_configure () {
> -    autotools_do_bootstrap
> +    if [ "${_INHIBITED}" = "n" ]; then
> +        autotools_do_bootstrap
> +    else
> +        find ${S} -name config.guess -exec \
> +            ln -sf ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess "{}" \;
> +        find ${S} -name config.sub -exec \
> +            ln -sf ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub "{}" \;
> +    fi
>  
>      if [ -e ${S}/configure ]; then
>          oe_runconf $@
> -- 
> 1.7.2.3
> 
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

-- 
-Khem




More information about the Openembedded-devel mailing list