]> Cypherpunks.ru repositories - goredo.git/blobdiff - ifchange.go
Up to date recfile
[goredo.git] / ifchange.go
index fe1c2a853a64e79192f5a99a1b183adf74fc05aa..1f2c38194934da44475e97e039fb73601536a5a0 100644 (file)
@@ -1,6 +1,6 @@
 /*
-goredo -- redo implementation on pure Go
-Copyright (C) 2020 Sergey Matveev <stargrave@stargrave.org>
+goredo -- djb's redo implementation on pure Go
+Copyright (C) 2020-2021 Sergey Matveev <stargrave@stargrave.org>
 
 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
@@ -114,7 +114,7 @@ func buildDependants(tgts []string) map[string]struct{} {
        Jobs.Wait()
        close(errs)
        if !ok {
-               trace(CDebug, "alwayses failed, skipping depdendants")
+               trace(CDebug, "alwayses failed, skipping dependants")
                return nil
        }
 
@@ -139,7 +139,7 @@ RebuildDeps:
        jobs := 0
        queueSrc = []string{}
        for _, tgt := range queue {
-               ood, err := isOOD(Cwd, tgt, 0, seen)
+               ood, err := isOODWithTrace(Cwd, tgt, 0, seen)
                if err != nil {
                        trace(CErr, "dependant error: %s, skipping dependants", err)
                        return nil
@@ -176,6 +176,7 @@ func ifchange(tgts []string, forced, traced bool) (bool, error) {
        defer jsAcquire("ifchange exiting")
        defer Jobs.Wait()
        seen := buildDependants(tgts)
+       oodTgtsClear()
        trace(CDebug, "building %d targets: %v", len(tgts), tgts)
        jobs := 0
        errs := make(chan error, len(tgts))
@@ -183,12 +184,12 @@ func ifchange(tgts []string, forced, traced bool) (bool, error) {
        var err error
        for _, tgt := range tgts {
                if _, ok := seen[tgt]; ok {
-                       trace(CDebug, "%s was already build as a dependenant", tgt)
+                       trace(CDebug, "%s was already build as a dependant", tgt)
                        continue
                }
                ood = true
                if !forced {
-                       ood, err = isOOD(Cwd, tgt, 0, seen)
+                       ood, err = isOODWithTrace(Cwd, tgt, 0, seen)
                        if err != nil {
                                return false, err
                        }