X-Git-Url: http://www.git.cypherpunks.ru/?p=goredo.git;a=blobdiff_plain;f=buildlog.go;h=a260867e8a5a7770fd830833fb2f6bcdcb7a8302;hp=3403e4d750d051a191bfaba0ecd88f31b74c64f8;hb=b4eefdd675c9aef9ff8bd1089d031ee05733195b;hpb=7492a39768035abafa55be738649a8dd035a89bd diff --git a/buildlog.go b/buildlog.go index 3403e4d..a260867 100644 --- a/buildlog.go +++ b/buildlog.go @@ -1,6 +1,6 @@ /* goredo -- djb's redo implementation on pure Go -Copyright (C) 2020-2021 Sergey Matveev +Copyright (C) 2020-2023 Sergey Matveev This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -76,7 +76,7 @@ func init() { } func parseBuildLogRec(dir, tgt string) (map[string][]string, error) { - fd, err := os.Open(path.Join(dir, RedoDir, tgt+LogSuffix+DepSuffix)) + fd, err := os.Open(path.Join(dir, RedoDir, tgt+LogRecSuffix)) if err != nil { return nil, err } @@ -200,18 +200,9 @@ func showBuildLog(dir, tgt string, buildLogRec map[string][]string, depth int) e return w.Flush() } defer fd.Close() - fdDep, err := os.Open(path.Join(dirNormalized, RedoDir, tgtNormalized+DepSuffix)) - if err != nil { - return err - } - depInfo, err := depRead(fdDep) - fdDep.Close() - if err != nil { - return err - } - subs := make([]*BuildLogJob, 0, len(depInfo.ifchanges)) - for _, dep := range depInfo.ifchanges { - subDir, subTgt := cwdAndTgt(path.Join(dirNormalized, dep["Target"])) + subs := make([]*BuildLogJob, 0, len(buildLogRec["Ifchange"])) + for _, dep := range buildLogRec["Ifchange"] { + subDir, subTgt := cwdAndTgt(path.Join(dirNormalized, dep)) if subDir == dirNormalized && subTgt == tgtNormalized { continue } @@ -238,7 +229,7 @@ func showBuildLog(dir, tgt string, buildLogRec map[string][]string, depth int) e } subs = append(subs, &BuildLogJob{ dir: dirNormalized, - tgt: dep["Target"], + tgt: dep, started: started, exitCode: exitCode, rec: rec,