From: Sergey Matveev Date: Thu, 10 Dec 2020 14:09:22 +0000 (+0300) Subject: Do not build initially provided targets as dependant ones X-Git-Tag: v0.4.0^0 X-Git-Url: http://www.git.cypherpunks.ru/?p=goredo.git;a=commitdiff_plain;h=0b3f0c3c467fcfaaad3cb01ca00513b838fd75e6 Do not build initially provided targets as dependant ones Because that hides possible tracing request. --- diff --git a/ifchange.go b/ifchange.go index f0e877e..fe1c2a8 100644 --- a/ifchange.go +++ b/ifchange.go @@ -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 { diff --git a/usage.go b/usage.go index 7b73f67..7670f76 100644 --- 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.