Patchwork [1/4] autotools.bbclass: update gnu-config files always

login
register
mail settings
Submitter Marcin Juszkiewicz
Date Oct. 8, 2012, 4:32 p.m.
Message ID <1349713951-30766-1-git-send-email-marcin.juszkiewicz@linaro.org>
Download mbox | patch
Permalink /patch/37935/
State New
Headers show

Comments

Marcin Juszkiewicz - Oct. 8, 2012, 4:32 p.m.
When recipe inherits autotools it gets do_configure defined. One of
things which are done is autoreconf so gnu-config files are updated to
latest OE version.

But some recipes use own do_configure due to hard edited configure
scripts or other reasons. We can edit those recipes one by one or can
trick them and provide update gnu-config files without using
autoreconf.

There are still some recipes left but that's usually due to other
directories than ${S} being used for configure scripts.

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
---
 meta/classes/autotools.bbclass |    4 ++++
 1 file changed, 4 insertions(+)
Chris Larson - Oct. 9, 2012, 4:38 a.m.
On Mon, Oct 8, 2012 at 9:32 AM, Marcin Juszkiewicz
<marcin.juszkiewicz@linaro.org> wrote:
> When recipe inherits autotools it gets do_configure defined. One of
> things which are done is autoreconf so gnu-config files are updated to
> latest OE version.
>
> But some recipes use own do_configure due to hard edited configure
> scripts or other reasons. We can edit those recipes one by one or can
> trick them and provide update gnu-config files without using
> autoreconf.
>
> There are still some recipes left but that's usually due to other
> directories than ${S} being used for configure scripts.
>
> Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
> ---
>  meta/classes/autotools.bbclass |    4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
> index e4e034b..7effd48 100644
> --- a/meta/classes/autotools.bbclass
> +++ b/meta/classes/autotools.bbclass
> @@ -99,6 +99,10 @@ autotools_preconfigure() {
>                         mkdir ${B}
>                 fi
>         fi
> +
> +       # not all recipes which use autotools use it's do_configure
> +       install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
> +       install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
>  }


This won't obey the autoconf macro which redirects such files into a
subdirectory, right? It shouldn't always go to ${S}, afaik. Quite a
few projects will use t his macro to move all those files into a
subdir like 'config' to clean up the root of the source tree. To
really do this properly, I think you'd have to:
1) descend into autoconf subdirs, so subdir configure runs also use
the updated gnu config files
2) extract the config subdir from autoconf and install them there, for
each of those dirs

Patch

diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index e4e034b..7effd48 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -99,6 +99,10 @@  autotools_preconfigure() {
 			mkdir ${B}
 		fi
 	fi
+
+	# not all recipes which use autotools use it's do_configure
+	install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
+	install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
 }
 
 autotools_postconfigure(){