X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=ifchange.go;h=128d1afbef6eaea5fdd1681af86cb1339ec8f738;hb=4274dce3366cee45bfaccbe5ca340ce6efe68e00;hp=0f430fdebd76741065215382cb76ee406690e3fe;hpb=ca5290c19761bc1806b98d54d966a9cbbfeabd15;p=goredo.git diff --git a/ifchange.go b/ifchange.go index 0f430fd..128d1af 100644 --- a/ifchange.go +++ b/ifchange.go @@ -116,7 +116,7 @@ func buildDependants(tgts []string) map[string]struct{} { } ok := true for i := 0; i < len(seen); i++ { - ok = ok && isOkRun(<-errs) + ok = isOkRun(<-errs) && ok } Jobs.Wait() close(errs) @@ -163,7 +163,7 @@ RebuildDeps: jobs++ } for i := 0; i < jobs; i++ { - ok = ok && isOkRun(<-errs) + ok = isOkRun(<-errs) && ok } if !ok { trace(CDebug, "dependants failed, skipping them") @@ -180,7 +180,9 @@ RebuildDeps: func ifchange(tgts []string, forced, traced bool) (bool, error) { jsInit() - defer jsAcquire("ifchange exiting") + if !IsTopRedo { + defer jsAcquire("ifchange exiting") + } defer Jobs.Wait() seen := buildDependants(tgts) oodTgtsClear() @@ -215,7 +217,7 @@ func ifchange(tgts []string, forced, traced bool) (bool, error) { } ok := true for ; jobs > 0; jobs-- { - ok = ok && isOkRun(<-errs) + ok = isOkRun(<-errs) && ok } return ok, nil }