forked from kcl-lang/kcl
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
53 lines (39 loc) · 875 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
# Copyright 2021 The KCL Authors. All rights reserved.
PROJECT_NAME = KCLVM
PWD:=$(shell pwd)
KCLVM_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}
# ----------------
# KCLVM build
# ----------------
.PHONY: build
build:
${PWD}/run.sh -a build
.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
# ----------------
# Docker
# ----------------
sh-in-docker:
${RUN_IN_DOCKER} bash