]> Cypherpunks.ru repositories - goredo.git/commitdiff
Do not build initially provided targets as dependant ones v0.4.0
authorSergey Matveev <stargrave@stargrave.org>
Thu, 10 Dec 2020 14:09:22 +0000 (17:09 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 10 Dec 2020 14:18:00 +0000 (17:18 +0300)
Because that hides possible tracing request.

ifchange.go
usage.go

index f0e877ef22c78da9f88f583b57d23bd244fe261d..fe1c2a853a64e79192f5a99a1b183adf74fc05aa 100644 (file)
@@ -83,9 +83,11 @@ func buildDependants(tgts []string) map[string]struct{} {
        trace(CDebug, "collecting deps")
        seen := map[string]struct{}{}
        deps := map[string]map[string]struct{}{}
-       for _, tgt := range tgts {
-               for _, tgt := range collectDeps(Cwd, tgt, 0, deps) {
-                       seen[tgt] = struct{}{}
+       for _, tgtInitial := range tgts {
+               for _, tgt := range collectDeps(Cwd, tgtInitial, 0, deps) {
+                       if tgt != tgtInitial {
+                               seen[tgt] = struct{}{}
+                       }
                }
        }
        if len(seen) == 0 {
index 7b73f6736dd74cd78efbb1d68411795cb8019eeb..7670f7615212d580e29384497ac9f99e02f75d41 100644 (file)
--- a/usage.go
+++ b/usage.go
@@ -26,7 +26,7 @@ import (
 )
 
 const (
-       Version  = "0.3.1"
+       Version  = "0.4.0"
        Warranty = `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
 the Free Software Foundation, version 3 of the License.