Debian Codegraph @

Makefile

raw symbols SCIP
1 # Static linting of source files. See .golangci.toml for options
2 check:
3 golangci-lint run
4
5 # Generate stdlib/syscall/syscall_GOOS_GOARCH.go for all platforms
6 gen_all_syscall: internal/cmd/extract/extract
7 @for v in $$(go tool dist list); do \
8 echo syscall_$${v%/*}_$${v#*/}.go; \
9 GOOS=$${v%/*} GOARCH=$${v#*/} go generate ./stdlib/syscall ./stdlib/unrestricted; \
10 done
11
12 internal/cmd/extract/extract:
13 rm -f internal/cmd/extract/extract
14 go generate ./internal/cmd/extract
15
16 generate: gen_all_syscall
17 go generate
18
19 install:
20 GOFLAGS=-ldflags=-X=main.version=$$(git describe --tags) go install ./...
21
22 tests:
23 go test -v ./...
24 go test -race ./interp
25
26 # https://github.com/goreleaser/godownloader
27 install.sh: .goreleaser.yml
28 godownloader --repo=traefik/yaegi -o install.sh .goreleaser.yml
29
30 generic_list = cmp/cmp.go slices/slices.go slices/sort.go slices/zsortanyfunc.go maps/maps.go \
31 sync/oncefunc.go sync/atomic/type.go
32
33 # get_generic_src imports stdlib files containing generic symbols definitions
34 get_generic_src:
35 eval "`go env`"; echo $$GOROOT; gov=$${GOVERSION#*.}; gov=$${gov%.*}; \
36 for f in ${generic_list}; do \
37 nf=stdlib/generic/go1_$${gov}_`echo $$f | tr / _`.txt; echo "nf: $$nf"; \
38 cat "$$GOROOT/src/$$f" > "$$nf"; \
39 done
40
41 .PHONY: check gen_all_syscall internal/cmd/extract/extract get_generic_src install