build: make llgen, cltest, gentests call build.Do

This commit is contained in:
Li Jie
2024-11-26 11:20:15 +08:00
parent 25bc84817a
commit d879d0d924
11 changed files with 87 additions and 172 deletions

View File

@@ -17,6 +17,7 @@
package main
import (
"flag"
"fmt"
"os"
@@ -24,11 +25,10 @@ import (
)
func main() {
if len(os.Args) < 2 {
fmt.Fprintln(os.Stderr, "Usage: llgen [flags] <pkg> [pkgPath]")
flag.Parse()
if len(flag.Args()) != 1 {
fmt.Fprintln(os.Stderr, "Usage: llgen [flags] <pkg>")
return
}
llgen.Init()
args := os.Args[1:]
llgen.SmartDoFile(args[0], args[1:]...)
llgen.SmartDoFile(flag.Args()[0])
}