Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (43 loc) · 1.4 KB
/
Copy pathMakefile
File metadata and controls
56 lines (43 loc) · 1.4 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
PKGS := ./...
BIN := bin/agy-reader
CMD := ./cmd/agy-reader
PREFIX ?= /usr/local
GOFILES := $(shell find . -maxdepth 1 -name '*.go') $(shell find internal cmd -name '*.go')
.PHONY: fmt vet lint test maintenance-test race build shim check clean install install-skills
fmt:
gofmt -w $(GOFILES)
vet:
go vet $(PKGS)
lint:
golangci-lint run
test:
go test $(PKGS)
maintenance-test:
python3 -B -m unittest discover -s scripts -p 'test_*.py'
race:
go test -race $(PKGS)
build:
go build -o $(BIN) $(CMD)
# Opt-in preload library for `scripts/agy-pair.py --token-mode=shim`.
# Needs a C compiler; Linux and glibc only. Never built by default.
shim:
install -d bin
$(CC) -shared -fPIC -O2 -Wall -Wextra -o bin/agy-pair-shim.so scripts/agy-pair-shim.c
install: build
install -d "$(PREFIX)/bin"
install -m 755 "$(BIN)" "$(PREFIX)/bin/agy-reader"
check: fmt vet lint test maintenance-test build
clean:
rm -rf bin
# Install first-party skills (tracked under skills/) into the agent skill dirs
# as relative symlinks. Those dirs (.claude/skills, .agents/skills) are
# gitignored install targets; skills/ is the source of truth. Idempotent.
install-skills:
@for d in skills/*/; do \
name=$$(basename "$$d"); \
for agent in .claude .agents; do \
mkdir -p "$$agent/skills"; \
ln -sfn "../../skills/$$name" "$$agent/skills/$$name"; \
echo "linked $$agent/skills/$$name -> ../../skills/$$name"; \
done; \
done