diff options
Diffstat (limited to 'meta/classes/autotools.bbclass')
| -rw-r--r-- | meta/classes/autotools.bbclass | 40 | 
1 files changed, 38 insertions, 2 deletions
| diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass index afca760804..c67896882d 100644 --- a/meta/classes/autotools.bbclass +++ b/meta/classes/autotools.bbclass @@ -135,15 +135,51 @@ python autotools_copy_aclocals () {              return      taskdepdata = d.getVar("BB_TASKDEPDATA", False) +    #bb.warn(str(taskdepdata))      pn = d.getVar("PN", True)      aclocaldir = d.getVar("ACLOCALDIR", True)      oe.path.remove(aclocaldir)      bb.utils.mkdirhier(aclocaldir) +    start = None      configuredeps = [] +      for dep in taskdepdata:          data = taskdepdata[dep] -        if data[1] == "do_configure" and data[0] != pn: -            configuredeps.append(data[0]) +        if data[1] == "do_configure" and data[0] == pn: +            start = dep +            break +    if not start: +        bb.fatal("Couldn't find ourself in BB_TASKDEPDATA?") + +    # We need to find configure tasks which are either from <target> -> <target> +    # or <native> -> <native> but not <target> -> <native> unless they're direct +    # dependencies. This mirrors what would get restored from sstate. +    done = [dep] +    next = [dep] +    while next: +        new = [] +        for dep in next: +            data = taskdepdata[dep] +            for datadep in data[3]: +                if datadep in done: +                    continue +                done.append(datadep) +                if (not data[0].endswith("-native")) and taskdepdata[datadep][0].endswith("-native") and dep != start: +                    continue +                new.append(datadep) +                if taskdepdata[datadep][1] == "do_configure": +                    configuredeps.append(taskdepdata[datadep][0]) +        next = new + +    #configuredeps2 = [] +    #for dep in taskdepdata: +    #    data = taskdepdata[dep] +    #    if data[1] == "do_configure" and data[0] != pn: +    #        configuredeps2.append(data[0]) +    #configuredeps.sort() +    #configuredeps2.sort() +    #bb.warn(str(configuredeps)) +    #bb.warn(str(configuredeps2))      cp = []      for c in configuredeps: | 
