forked from makspll/bevy_mod_scripting
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
79 lines (71 loc) · 4.13 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Create the benchmark executable with debugging symbols, but do not run it. We
# don't want valgrind to profile the compiler, so we have the "--no-run" flag. We
# also need debugging symbols so valgrind can track down source code
# appropriately. It blows my mind to this day that compiling with optimizations +
# debugging symbols is a thing. For so long I thought they were mutually
# exclusive.
# RUSTFLAGS="-g" cargo bench --no-run
# Let's say this was the executable
EXEC="./target/release/"
# Now identify a single test that you want profiled. Test identifiers are
# printed in the console output, so I'll use the one that I posted earlier
T_ID="Hello/World"
TIME="10"
# Have valgrind profile criterion running our benchmark for 10 seconds
FLAGS=
# # valgrind outputs a callgrind.out.<pid>. We can analyze this with kcachegrind
# kcachegrind
comp_benches:
RUSTFLAGS="-g" cargo bench --no-run
valgrind:
valgrind --tool=callgrind \
--dump-instr=yes \
--collect-jumps=yes \
--simulate-cache=yes \
${EXEC} --bench ${T_ID}
generate_api:
cd bevy_api_gen && \
cargo run \
-- \
--json "../target/doc/bevy_asset.json" \
--json "../target/doc/bevy_ecs.json" \
--json "../target/doc/bevy_pbr.json" \
--json "../target/doc/bevy_render.json" \
--json "../target/doc/bevy_math.json" \
--json "../target/doc/bevy_transform.json" \
--json "../target/doc/bevy_sprite.json" \
--json "../target/doc/bevy_ui.json" \
--json "../target/doc/bevy_animation.json" \
--json "../target/doc/bevy_core.json" \
--json "../target/doc/bevy_core_pipeline.json" \
--json "../target/doc/bevy_gltf.json" \
--json "../target/doc/bevy_hierarchy.json" \
--json "../target/doc/bevy_text.json" \
--json "../target/doc/bevy_time.json" \
--json "../target/doc/bevy_utils.json" \
--json "../target/doc/bevy_reflect.json" \
--json "../target/doc/bevy.json" \
--json "../target/doc/glam.json" \
--config "../api_gen_config.toml" ${FLAGS} \
> ../bevy_script_api/src/generated.rs
rustfmt ./bevy_script_api/src/generated.rs
make_json_files:
rustup run nightly-2023-07-16 cargo rustdoc -p [email protected] -- -Zunstable-options --output-format json && \
rustup run nightly-2023-07-16 cargo rustdoc -p [email protected] -- -Zunstable-options --output-format json && \
rustup run nightly-2023-07-16 cargo rustdoc -p [email protected] -- -Zunstable-options --output-format json && \
rustup run nightly-2023-07-16 cargo rustdoc -p [email protected] -- -Zunstable-options --output-format json && \
rustup run nightly-2023-07-16 cargo rustdoc -p [email protected] -- -Zunstable-options --output-format json && \
rustup run nightly-2023-07-16 cargo rustdoc -p [email protected] -- -Zunstable-options --output-format json && \
rustup run nightly-2023-07-16 cargo rustdoc -p [email protected] -- -Zunstable-options --output-format json && \
rustup run nightly-2023-07-16 cargo rustdoc -p [email protected] -- -Zunstable-options --output-format json && \
rustup run nightly-2023-07-16 cargo rustdoc -p [email protected] -- -Zunstable-options --output-format json && \
rustup run nightly-2023-07-16 cargo rustdoc -p [email protected] -- -Zunstable-options --output-format json && \
rustup run nightly-2023-07-16 cargo rustdoc -p [email protected] -- -Zunstable-options --output-format json && \
rustup run nightly-2023-07-16 cargo rustdoc -p [email protected] -- -Zunstable-options --output-format json && \
rustup run nightly-2023-07-16 cargo rustdoc -p [email protected] -- -Zunstable-options --output-format json && \
rustup run nightly-2023-07-16 cargo rustdoc -p [email protected] -- -Zunstable-options --output-format json && \
rustup run nightly-2023-07-16 cargo rustdoc -p [email protected] -- -Zunstable-options --output-format json && \
rustup run nightly-2023-07-16 cargo rustdoc -p [email protected] -- -Zunstable-options --output-format json && \
rustup run nightly-2023-07-16 cargo rustdoc -p [email protected] -- -Zunstable-options --output-format json && \
rustup run nightly-2023-07-16 cargo rustdoc -p [email protected] -- -Zunstable-options --output-format json && \
rustup run nightly-2023-07-16 cargo rustdoc -p [email protected] -- -Zunstable-options --output-format json