return true
}
+func isOODByBuildUUID(cwd, tgtOrig string) bool {
+ cwd, tgt := cwdAndTgt(path.Join(cwd, tgtOrig))
+ depPath := path.Join(cwd, RedoDir, tgt+DepSuffix)
+ fdDep, err := os.Open(depPath)
+ if err != nil {
+ return true
+ }
+ depInfo, err := depRead(fdDep)
+ fdDep.Close()
+ if err != nil || depInfo.build != BuildUUID {
+ return true
+ }
+ return false
+}
+
func isOOD(cwd, tgtOrig string, level int, seen map[string]struct{}) (bool, error) {
indent := strings.Repeat(". ", level)
trace(CDebug, "ood: %s%s checking", indent, tgtOrig)
trace(CDebug, "ood: %s%s -> already built", indent, tgtOrig)
return false, nil
}
+ if _, err := os.Stat(path.Join(cwd, tgt)); err != nil && os.IsNotExist(err) {
+ trace(CDebug, "ood: %s%s -> non-existent", indent, tgtOrig)
+ return true, nil
+ }
ood := false
for _, dep := range depInfo.ifcreates {
}
_, ood := OODTgts[p]
if ood {
+ if !isOODByBuildUUID(cwd, tgtOrig) {
+ trace(
+ CDebug,
+ "ood: %s%s -> already built",
+ strings.Repeat(". ", level), tgtOrig,
+ )
+ return false, nil
+ }
trace(
CDebug,
"ood: %s%s true, external decision",