diff --git a/context.go b/context.go index 5aced77..2599a2c 100644 --- a/context.go +++ b/context.go @@ -977,8 +977,6 @@ func (c *Context) addModules(modules []*moduleInfo) (errs []error) { ninjaName = toNinjaName(module.properties.Name) + strconv.Itoa(i) } - c.moduleNinjaNames[ninjaName] = group - group := &moduleGroup{ name: module.properties.Name, ninjaName: ninjaName, @@ -986,6 +984,7 @@ func (c *Context) addModules(modules []*moduleInfo) (errs []error) { } module.group = group c.moduleGroups[name] = group + c.moduleNinjaNames[ninjaName] = group } }