-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (28 loc) · 835 Bytes
/
Makefile
File metadata and controls
39 lines (28 loc) · 835 Bytes
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
.PHONY: clean clippy lint fmt all release debug ubuntu_shell
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S), Darwin)
LDFLAGS=-framework Foundation -framework Security
endif
ifeq ($(UNAME_S), Linux)
LDFLAGS=-lcrypt -lm -lpthread -lrt -ldl
endif
LDFLAGS += -lz
all: release debug
debug:
bash -c "find target/debug | grep -i 'librubyfmt-.*\.a' | xargs rm; exit 0"
cargo build
release:
bash -c "find target/release | grep -i 'librubyfmt-.*\.a' | xargs rm; exit 0"
cargo build --release
ubuntu_shell:
docker build -t rubyfmt_testing_container:$(shell git rev-parse HEAD) -f ./dockerfiles/build.Dockerfile ./
docker run -it rubyfmt_testing_container:$(shell git rev-parse HEAD) bash
lint: clippy
./script/lints/lint_fixtures.sh
./script/lints/lint_scripts.sh
clean:
rm -rf target/
fmt:
cargo fmt
clippy:
cargo clippy