-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.toml
45 lines (35 loc) · 969 Bytes
/
Makefile.toml
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
[tasks.compile-list]
env = { "CARGO_MAKE_RUST_SCRIPT_PROVIDER" = "cargo-play" }
script_runner = "@rust"
script = '''
//# psl-codegen = "0.9"
fn main() {
let list = psl_codegen::compile_psl("data/rules.txt");
let module = format!("//! This file is automatically @generated by cargo-make.
//! It is not intended for manual editing.
#![allow(clippy::all)] // TODO lint this code?
{}", list);
std::fs::write("src/list.rs", module).unwrap();
}
'''
[tasks.format]
install_crate = "rustfmt"
command = "cargo"
args = ["fmt", "--all"]
dependencies = ["compile-list"]
[tasks.check]
command = "cargo"
args = ["check", "--all-features"]
dependencies = ["format"]
[tasks.build]
command = "cargo"
args = ["build", "--all-features"]
dependencies = ["format"]
[tasks.clippy]
command = "cargo"
args = ["clippy", "--all-features"]
dependencies = ["format"]
[tasks.test]
command = "cargo"
args = ["test", "--all-features"]
dependencies = ["format"]