- return false, err
- }
- if depInfo.build != BuildUUID {
- return false, errors.New("is not built")
- }
- return depInfo.stampSame, nil
-}
-
-func formDepPath(cwd, tgt string) string {
- cwd, tgt = cwdAndTgt(path.Join(cwd, tgt))
- return path.Join(cwd, RedoDir, tgt+DepSuffix)
-}
-
-func isOOD(cwd, tgtOrig string, level int, depInfo *DepInfo) (bool, error) {
- indent := strings.Repeat(". ", level)
- trace(CDebug, "ood: %s%s checking", indent, tgtOrig)
- cwd, tgt := cwdAndTgt(path.Join(cwd, tgtOrig))
- depPath := formDepPath(cwd, tgt)
- if depInfo == nil {
- fdDep, err := os.Open(depPath)
- if err != nil {
- trace(CDebug, "ood: %s%s -> no dep: %s", indent, tgtOrig, depPath)
- return true, nil
- }
- defer fdDep.Close()
- depInfo, err = depRead(fdDep)
- if err != nil {
- return true, TgtErr{tgtOrig, err}
- }