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()
var (
Cwd string
BuildUUID string
+ IsTopRedo bool // is it the top redo instance
)
func mustSetenv(key, value string) {
BuildUUID = os.Getenv(EnvBuildUUID)
tgtsWasEmpty := len(tgts) == 0
if BuildUUID == "" {
+ IsTopRedo = true
raw := new([16]byte)
if _, err = io.ReadFull(rand.Reader, raw[:]); err != nil {
log.Fatalln(err)