CmdStrToMakefile does what is needed to make the command string suitable for makefiles * removes -output
(cmdstr string)
| 695 | // CmdStrToMakefile does what is needed to make the command string suitable for makefiles |
| 696 | // * removes -output |
| 697 | func CmdStrToMakefile(cmdstr string) string { |
| 698 | if oidx := strings.Index(cmdstr, "-output="); oidx > 0 { |
| 699 | spidx := strings.Index(cmdstr[oidx:], " ") |
| 700 | cmdstr = cmdstr[:oidx] + cmdstr[oidx+spidx+1:] |
| 701 | } |
| 702 | cmds := strings.Fields(cmdstr) |
| 703 | ncmds := make([]string, 0, len(cmds)+1) |
| 704 | ncmds = append(ncmds, cmds[:2]...) |
| 705 | ncmds = append(ncmds, "-no-make") |
| 706 | ncmds = append(ncmds, cmds[2:]...) |
| 707 | |
| 708 | return strings.Join(ncmds, " ") |
| 709 | } |
| 710 | |
| 711 | func (g *pyGen) genMakefile() { |
| 712 | gencmd := strings.Replace(g.cfg.Cmd, "gopy build", "gopy gen", 1) |
no outgoing calls
no test coverage detected