-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcmd_make.go
More file actions
35 lines (30 loc) · 757 Bytes
/
Copy pathcmd_make.go
File metadata and controls
35 lines (30 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package main
import (
"errors"
"io"
"os"
)
var makeHelp = &helpNode{
cmd: "make",
synopsis: "Execute '$ make <target>' on current kernel.",
usage: func(w io.Writer) {
cmdTitle(w, false, "make <target>")
cmdUsage(w, "This is the way to pass through kbdashboard and invoke\n"+
"kernel's make directly.\n"+
"So the <target> is just as the same as kernel's own\n"+
"Makefile's target.\n")
},
}
func makeHandler(args []string, data interface{}) (int, error) {
if len(args) == 0 {
return 0, errors.New("'make' need paramters.")
}
target := args[0]
args = args[1:]
p, _, err := getCurrentProfile(gConfig)
if err != nil {
return 0, err
}
printCmd("make "+target, p.Name)
return 0, makeKernel(p, target, os.Stdout, true)
}