forked from seL4/rust-sel4
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
129 lines (98 loc) · 2.67 KB
/
Makefile
File metadata and controls
129 lines (98 loc) · 2.67 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
ifeq ($(K),1)
keep_going := -k
endif
ifneq ($(J),)
jobs := -j$(J)
endif
out := out
nix_build := nix-build $(keep_going) $(jobs)
.PHONY: none
none:
.PHONY: clean
clean:
rm -rf $(out) target
$(out):
mkdir -p $@
rustc_target_spec_dir := support/targets
.PHONY: generate-target-specs
generate-target-specs:
rm -f $(rustc_target_spec_dir)/*.json && \
cargo run -p sel4-generate-target-specs -- write --target-dir $(rustc_target_spec_dir) --all
.PHONY: update-generated-sources
update-generated-sources:
script=$$($(nix_build) -A generatedSources.update --no-out-link) && $$script
cargo update -w
.PHONY: check-generated-sources
check-generated-sources:
script=$$($(nix_build) -A generatedSources.check --no-out-link) && $$script
cargo update -w --locked
.PHONY: update-lockfile
update-lockfile:
cargo update -w
.PHONY: check-lockfile
check-lockfile:
cargo update -w --locked
.PHONY: fmt
fmt:
cargo fmt --all
.PHONY: check-fmt
check-fmt:
cargo fmt --all -- --check
.PHONY: check-generic-formatting
check-generic-formatting:
./hacking/scripts/check-generic-formatting.sh
.PHONY: check-source
check-source: check-generated-sources check-fmt check-generic-formatting
try_restore_terminal := tput smam 2> /dev/null || true
.PHONY: run-tests
run-tests:
script=$$($(nix_build) -A runTests --no-out-link) && $$script
$(try_restore_terminal)
.PHONY: run-fast-tests
run-fast-tests:
script=$$($(nix_build) -A runFastTests --no-out-link) && $$script
$(try_restore_terminal)
.PHONY: witness-tests
witness-tests:
$(nix_build) -A witnessTests --no-out-link
$(try_restore_terminal)
.PHONY: witness-fast-tests
witness-fast-tests:
$(nix_build) -A witnessFastTests --no-out-link
$(try_restore_terminal)
.PHONY: everything-except-non-incremental
everything-except-non-incremental:
$(nix_build) -A everythingExceptNonIncremental --no-out-link
.PHONY: everything
everything:
$(nix_build) -A everything --no-out-link
.PHONY: everything-with-excess
everything-with-excess:
$(nix_build) -A everythingWithExcess --no-out-link
.PHONY: html-links
html-links:
$(nix_build) -A html -o $(out)/$@
.PHONY: html
html: | $(out)
src=$$($(nix_build) -A html --no-out-link) && \
dst=$(out)/html && \
rm -rf $$dst && \
cp -rL --no-preserve=owner,mode $$src $$dst
.PHONY: example
example:
script=$$($(nix_build) -A $@ --no-out-link) && $$script
.PHONY: example-rpi4-b-4gb
example-rpi4-b-4gb:
$(nix_build) -A $@ -o $(out)/$@
.PHONY: check-fast
check-fast: check-source
$(MAKE) witness-fast-tests
$(MAKE) everything-fast
.PHONY: check-exhaustively
check-exhaustively: check-source
$(MAKE) witness-tests
$(MAKE) everything
.PHONY: check-oneshot
check-oneshot: check-source
$(MAKE) run-tests
$(MAKE) everything