-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (29 loc) · 776 Bytes
/
Copy pathMakefile
File metadata and controls
39 lines (29 loc) · 776 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
36
37
38
39
GO ?= go
NNCTL ?= bin/nnctl
PREK ?= npx --no-install prek
.PHONY: all build nnctl test run precommit hooks clean help
all: build
build: nnctl
nnctl:
mkdir -p $(dir $(NNCTL))
$(GO) build -C nnctl -o ../$(NNCTL) ./cmd/nnctl
test:
$(GO) test ./nnctl/...
run:
$(GO) run ./nnctl/cmd/nnctl --help
precommit:
$(PREK) run --all-files
hooks:
$(PREK) install -f
clean:
rm -f $(NNCTL)
help:
@printf "Usage: make [target]\n\n"
@printf "Targets:\n"
@printf " build Build ./bin/nnctl\n"
@printf " nnctl Build ./bin/nnctl\n"
@printf " test Run nnctl Go tests\n"
@printf " run Show nnctl help via go run\n"
@printf " precommit Run prek hooks on all files\n"
@printf " hooks Install prek git hooks\n"
@printf " clean Remove ./bin/nnctl\n"