]> Cypherpunks.ru repositories - goredo.git/blobdiff - ifchange.go
Prepare to rename DepInfo->Dep
[goredo.git] / ifchange.go
index dbe03cfce8311872fd68ed1f1949253762872693..0cb50c51d0785bef62596e28669936be3f28fff6 100644 (file)
@@ -31,7 +31,7 @@ func collectDeps(
        if _, ok := seen[tgt.a]; ok {
                return nil
        }
-       depInfo, err := depRead(tgt)
+       dep, err := depRead(tgt)
        if err != nil {
                return nil
        }
@@ -39,8 +39,8 @@ func collectDeps(
        seen[tgt.a] = struct{}{}
        var alwayses []*Tgt
        returnReady := false
-       if depInfo.always {
-               if depInfo.build == BuildUUID {
+       if dep.always {
+               if dep.build == BuildUUID {
                        tracef(
                                CDebug, "ood: %s%s always, but already build",
                                strings.Repeat(". ", level), tgt,
@@ -52,18 +52,18 @@ func collectDeps(
                        returnReady = true
                }
        }
-       for _, dep := range depInfo.ifchanges {
-               if dep.tgt.a == tgt.a {
+       for _, ifchange := range dep.ifchanges {
+               if ifchange.tgt.rel == tgt.rel {
                        continue
                }
-               if !includeSrc && isSrc(dep.tgt) {
+               if !includeSrc && isSrc(ifchange.tgt) {
                        continue
                }
                if !returnReady {
-                       if m, ok := deps[dep.tgt.a]; ok {
-                               m[tgt.a] = tgt
+                       if m, ok := deps[ifchange.tgt.rel]; ok {
+                               m[tgt.rel] = tgt
                        } else {
-                               deps[dep.tgt.a] = map[string]*Tgt{tgt.a: tgt}
+                               deps[ifchange.tgt.rel] = map[string]*Tgt{tgt.rel: tgt}
                        }
                        alwayses = append(alwayses,
                                collectDeps(dep.tgt, level+1, deps, includeSrc, seen)...)