mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-19 21:51:31 +00:00
buildman: allow multiple toolchains in a single path
When buildman scans a toolchain path, it stops at the first toolchain found. However, a single path can contains several toolchains, each with its own prefix. This patch lets buildman scan all toolchains in the path. Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
8895b3e16c
commit
d908898333
1 changed files with 5 additions and 4 deletions
|
@ -197,13 +197,14 @@ class Toolchains:
|
||||||
Returns:
|
Returns:
|
||||||
Filename of C compiler if found, else None
|
Filename of C compiler if found, else None
|
||||||
"""
|
"""
|
||||||
|
fnames = []
|
||||||
for subdir in ['.', 'bin', 'usr/bin']:
|
for subdir in ['.', 'bin', 'usr/bin']:
|
||||||
dirname = os.path.join(path, subdir)
|
dirname = os.path.join(path, subdir)
|
||||||
if verbose: print " - looking in '%s'" % dirname
|
if verbose: print " - looking in '%s'" % dirname
|
||||||
for fname in glob.glob(dirname + '/*gcc'):
|
for fname in glob.glob(dirname + '/*gcc'):
|
||||||
if verbose: print " - found '%s'" % fname
|
if verbose: print " - found '%s'" % fname
|
||||||
return fname
|
fnames.append(fname)
|
||||||
return None
|
return fnames
|
||||||
|
|
||||||
|
|
||||||
def Scan(self, verbose):
|
def Scan(self, verbose):
|
||||||
|
@ -219,8 +220,8 @@ class Toolchains:
|
||||||
if verbose: print 'Scanning for tool chains'
|
if verbose: print 'Scanning for tool chains'
|
||||||
for path in self.paths:
|
for path in self.paths:
|
||||||
if verbose: print " - scanning path '%s'" % path
|
if verbose: print " - scanning path '%s'" % path
|
||||||
fname = self.ScanPath(path, verbose)
|
fnames = self.ScanPath(path, verbose)
|
||||||
if fname:
|
for fname in fnames:
|
||||||
self.Add(fname, True, verbose)
|
self.Add(fname, True, verbose)
|
||||||
|
|
||||||
def List(self):
|
def List(self):
|
||||||
|
|
Loading…
Add table
Reference in a new issue