File: Makefile.toml

package info (click to toggle)
rust-psl 2.1.78-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,540 kB
  • sloc: makefile: 2
file content (45 lines) | stat: -rw-r--r-- 969 bytes parent folder | download | duplicates (3)
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"]