-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (24 loc) · 871 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
.PHONY: all container format format-check native clean clean-native
CONTAINER_BIN=podman
CONTAINER_FILE=container/Containerfile
CONTAINER_NAME=mlir-rust
TESTS_DIR=tests/lit-tests-rust
CARGO_TOML=Cargo.toml
CARGO_TOML_TESTS=${TESTS_DIR}/Cargo.toml
all: container
container:
${CONTAINER_BIN} build -t ${CONTAINER_NAME} -f ${CONTAINER_FILE} .
clean:
${CONTAINER_BIN} image rm ${CONTAINER_NAME}
native:
cargo build
clean-native:
cargo clean
format:
cargo fmt --all --manifest-path ${CARGO_TOML}
cargo fmt --all --manifest-path ${CARGO_TOML_TESTS}
cargo fmt --all --manifest-path ${CARGO_TOML_TESTS} -- ${TESTS_DIR}/src/*.lit-rs
format-check:
cargo fmt --all --check --manifest-path ${CARGO_TOML} && \
cargo fmt --all --check --manifest-path ${CARGO_TOML_TESTS} && \
cargo fmt --all --check --manifest-path ${CARGO_TOML_TESTS} -- ${TESTS_DIR}/src/*.lit-rs