- tgt = m["Target"]
- if !strings.HasSuffix(tgt, ".do") && isSrc(cwd, tgt) {
- pth, err := filepath.Abs(path.Join(cwd, tgt))
+ depTgt := m["Target"]
+ depTgtAbsPath, err := filepath.Abs(path.Join(cwd, depTgt))
+ if err != nil {
+ panic(err)
+ }
+ if isSrc(cwd, depTgt) {
+ seen[cwdMustRel(depTgtAbsPath)] = struct{}{}
+ } else if depTgtAbsPath != tgtAbsPath {
+ subSrcs, err := sourcesWalker([]string{cwdMustRel(depTgtAbsPath)})