forked from google/go-jsonnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (53 loc) · 1.51 KB
/
Makefile
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
57
58
59
60
61
62
63
64
65
66
67
68
all: install.dependencies generate generate.stdlib build.bazel test tidy
.PHONY: all
# https://github.com/golang/go/issues/30515
# We temporarily set GO111MODULE=off here to avoid adding these binaries to the go.mod|sum files
# As they are not needed during runtime
install.dependencies : export GO111MODULE=off
install.dependencies:
git submodule init
git submodule update
go get github.com/clipperhouse/gen
go get github.com/clipperhouse/set
.PHONY: install.dependencies
build.bazel:
bazel build //cmd/jsonnet
.PHONY: build.bazel
_build.bazel.os:
bazel build --platforms=@io_bazel_rules_go//go/toolchain:$(OS)_amd64 //cmd/jsonnet
.PHONY: build.bazel.os
build.bazel.linux : OS=linux
build.bazel.linux: _build.bazel.os
.PHONY: build.bazel.linux
build.bazel.darwin : OS=darwin
build.bazel.darwin: _build.bazel.os
.PHONY: build.bazel.darwin
build.bazel.windows : OS=windows
build.bazel.windows: _build.bazel.os
.PHONY: build.bazel.windows
build:
go build ./cmd/jsonnet
.PHONY: build
build.old:
go build -o jsonnet-old ./cmd/jsonnet
.PHONY: build.old
test:
./tests.sh
.PHONY: test
benchmark : FILTER ?= Builtin
benchmark: build
./benchmark.sh ${FILTER}
.PHONY: benchmark
generate:
go generate
.PHONY: generate
generate.stdlib:
go run cmd/dumpstdlibast/dumpstdlibast.go cpp-jsonnet/stdlib/std.jsonnet > astgen/stdast.go
.PHONY: generate.stdlib
tidy:
go mod tidy
bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro=bazel/deps.bzl%jsonnet_go_dependencies
.PHONY: tidy
gazelle:
bazel run //:gazelle
.PHONY: gazelle