-
Notifications
You must be signed in to change notification settings - Fork 118
/
Makefile
61 lines (45 loc) · 959 Bytes
/
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
# Copyright The KCL Authors. All rights reserved.
PROJECT_NAME = kcl
PWD:=$(shell pwd)
VERSION := $(shell cat VERSION)
BUILD_IMAGE:=kcllang/kcl-builder
# export DOCKER_DEFAULT_PLATFORM=linux/amd64
# or
# --platform linux/amd64
RUN_IN_DOCKER:=docker run -it --rm
RUN_IN_DOCKER+=-v ~/.ssh:/root/.ssh
RUN_IN_DOCKER+=-v ~/.gitconfig:/root/.gitconfig
RUN_IN_DOCKER+=-v ${PWD}:/root/kclvm
RUN_IN_DOCKER+=-w /root/kclvm ${BUILD_IMAGE}
# ----------------
# Build
# ----------------
.PHONY: build
build:
${PWD}/run.sh -a build
.PHONY: build-lsp
build-lsp:
make -C ./kclvm build-lsp
.PHONY: release
release:
${PWD}/run.sh -a release
.PHONY: check
check:
make -C ./kclvm check
.PHONY: test
test:
make -C ./kclvm test
.PHONY: test-grammar
test-grammar:
make -C ./kclvm test-grammar
.PHONY: fmt
fmt:
make -C ./kclvm fmt
.PHONY: tag
tag:
scripts/tag.sh v$(VERSION)
# ----------------
# Docker
# ----------------
sh-in-docker:
${RUN_IN_DOCKER} bash