-
Notifications
You must be signed in to change notification settings - Fork 49
/
Makefile
34 lines (24 loc) · 913 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
.PHONY: clean clippy lint fmt
debug: target/rubyfmt_debug.bundle
all: release debug
release: target/rubyfmt_release.bundle
lint: clippy
./script/lints/lint_fixtures.sh
./script/lints/lint_scripts.sh
./script/lints/lint_rust.sh
target/rubyfmt_debug.bundle: ext/extconf.rb target/debug/librubyfmt.a
cp ext/* ./target
cd target && ruby extconf.rb && make
target/rubyfmt_release.bundle: ext/extconf.rb target/release/librubyfmt.a
cp ext/* ./target
cd target && ruby extconf.rb --release && make
target/debug/librubyfmt.a: native/src/*.rs native/Cargo.toml
mkdir -p target/debug
cd native/ && cargo build && cp target/debug/librubyfmt.a ../target/debug
target/release/librubyfmt.a: native/src/*.rs native/Cargo.toml
mkdir -p target/release
cd native/ && cargo build --release && cp target/release/librubyfmt.a ../target/release
clean:
rm -rf target/
fmt:
cd native && cargo fmt && git add -u ./