<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 22, 2017 at 3:38 PM, Chris Johns <span dir="ltr"><<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_-3216314987644958021HOEnZb"><div class="m_-3216314987644958021h5">On 23/11/2017 02:33, Joel Sherrill wrote:<br>
> Updates #3520.<br>
> ---<br>
>  source-builder/sb/bootstrap.py | 13 +++++++++++--<br>
>  1 file changed, 11 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/source-builder/sb/bootstrap.<wbr>py b/source-builder/sb/bootstrap.<wbr>py<br>
> index 9095f3c..8fda3b8 100644<br>
> --- a/source-builder/sb/bootstrap.<wbr>py<br>
> +++ b/source-builder/sb/bootstrap.<wbr>py<br>
> @@ -34,6 +34,14 @@ import options<br>
>  import path<br>
>  import version<br>
><br>
> +def _collect_dirs(path_, dir):<br>
> +    confs = []<br>
> +    for root, dirs, files in os.walk(path.host(path_), topdown = True):<br>
> +        for f in dirs:<br>
> +            if f == dir:<br>
> +                confs += [path.shell(path.join(root, f))]<br>
> +    return confs<br>
> +<br>
>  def _collect(path_, file):<br>
>      confs = []<br>
>      for root, dirs, files in os.walk(path.host(path_), topdown = True):<br>
> @@ -130,7 +138,7 @@ class autoreconf:<br>
><br>
>      def bspopts(self):<br>
>          if _grep(self.configure, 'RTEMS_CHECK_BSPDIR'):<br>
> -            bsp_specs = _collect(self.cwd, 'bsp_specs')<br>
> +            bsps = _collect_dirs(self.cwd, 'custom')<br>
>              try:<br>
>                  acinclude = path.join(self.cwd, 'acinclude.m4')<br>
>                  b = open(path.host(acinclude), 'w')<br>
> @@ -138,8 +146,9 @@ class autoreconf:<br>
>                  b.write('AC_DEFUN([RTEMS_CHECK<wbr>_BSPDIR],' + os.linesep)<br>
>                  b.write('[' + os.linesep)<br>
>                  b.write('  case "$1" in' + os.linesep)<br>
> -                for bs in sorted(bsp_specs):<br>
> +                for bs in sorted(bsps):<br>
>                      dir = path.dirname(bs)[len(self.cwd) + 1:]<br>
> +                    dir = os.path.dirname(dir)<br>
<br>
</div></div>I think this should be the wrapped `path` call `path.dirname()`.<br></blockquote><div><br></div><div>OK. That works and is now pushed.</div><div><br></div><div>I am just glad I didn't get a complete failing grade on my first Python patch. :)</div><div><br></div><div>Any comments on the patches to the autotools infrastructure? Nibbling on bsp_specs</div><div><br></div><div>--joel <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Chris<br>
<span><br>
>                      b.write('  %s )%s' % (dir, os.linesep))<br>
>                      b.write('    AC_CONFIG_SUBDIRS([%s]);;%s' % (dir, os.linesep))<br>
>                  b.write('  *)' + os.linesep)<br>
><br>
</span>______________________________<wbr>_________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman<wbr>/listinfo/devel</a><br>
</blockquote></div><br></div></div>