@@ -12,6 +12,10 @@ ifeq ($(DUNE_PROFILE),)
12
12
DUNE_PROFILE := dev
13
13
endif
14
14
15
+ # Dune
16
+ DUNE = scripts/dune_wrapper
17
+
18
+
15
19
# Temp directory
16
20
TMPDIR ?= /tmp
17
21
@@ -77,64 +81,64 @@ libp2p_helper:
77
81
78
82
genesis_ledger : ocaml_checks
79
83
$(info Building runtime_genesis_ledger)
80
- ulimit -s 65532 && (ulimit -n 10240 || true) && env MINA_COMMIT_SHA1=$(GITLONGHASH ) dune exec --profile=$(DUNE_PROFILE ) src/app/runtime_genesis_ledger/runtime_genesis_ledger.exe -- --genesis-dir $(GENESIS_DIR )
84
+ ulimit -s 65532 && (ulimit -n 10240 || true) && env MINA_COMMIT_SHA1=$(GITLONGHASH ) $( DUNE ) exec --profile=$(DUNE_PROFILE ) src/app/runtime_genesis_ledger/runtime_genesis_ledger.exe -- --genesis-dir $(GENESIS_DIR )
81
85
$(info Genesis ledger and genesis proof generated)
82
86
83
87
build : ocaml_checks git_hooks reformat-diff libp2p_helper
84
88
$(info Starting Build)
85
- ulimit -s 65532 && (ulimit -n 10240 || true) && env MINA_COMMIT_SHA1=$(GITLONGHASH ) dune build src/app/logproc/logproc.exe src/app/cli/src/mina.exe --profile=$(DUNE_PROFILE )
89
+ ulimit -s 65532 && (ulimit -n 10240 || true) && env MINA_COMMIT_SHA1=$(GITLONGHASH ) $( DUNE ) build src/app/logproc/logproc.exe src/app/cli/src/mina.exe --profile=$(DUNE_PROFILE )
86
90
$(info Build complete)
87
91
88
92
build_all_sigs : ocaml_checks git_hooks reformat-diff libp2p_helper
89
93
$(info Starting Build)
90
- ulimit -s 65532 && (ulimit -n 10240 || true) && env MINA_COMMIT_SHA1=$(GITLONGHASH ) dune build src/app/logproc/logproc.exe src/app/cli/src/mina.exe src/app/cli/src/mina_testnet_signatures.exe src/app/cli/src/mina_mainnet_signatures.exe --profile=$(DUNE_PROFILE )
94
+ ulimit -s 65532 && (ulimit -n 10240 || true) && env MINA_COMMIT_SHA1=$(GITLONGHASH ) $( DUNE ) build src/app/logproc/logproc.exe src/app/cli/src/mina.exe src/app/cli/src/mina_testnet_signatures.exe src/app/cli/src/mina_mainnet_signatures.exe --profile=$(DUNE_PROFILE )
91
95
$(info Build complete)
92
96
93
97
build_archive : ocaml_checks git_hooks reformat-diff
94
98
$(info Starting Build)
95
- ulimit -s 65532 && (ulimit -n 10240 || true) && dune build src/app/archive/archive.exe --profile=$(DUNE_PROFILE )
99
+ ulimit -s 65532 && (ulimit -n 10240 || true) && $( DUNE ) build src/app/archive/archive.exe --profile=$(DUNE_PROFILE )
96
100
$(info Build complete)
97
101
98
102
build_archive_all_sigs : ocaml_checks git_hooks reformat-diff
99
103
$(info Starting Build)
100
- ulimit -s 65532 && (ulimit -n 10240 || true) && dune build src/app/archive/archive.exe src/app/archive/archive_testnet_signatures.exe src/app/archive/archive_mainnet_signatures.exe --profile=$(DUNE_PROFILE )
104
+ ulimit -s 65532 && (ulimit -n 10240 || true) && $( DUNE ) build src/app/archive/archive.exe src/app/archive/archive_testnet_signatures.exe src/app/archive/archive_mainnet_signatures.exe --profile=$(DUNE_PROFILE )
101
105
$(info Build complete)
102
106
103
107
build_rosetta : ocaml_checks
104
108
$(info Starting Build)
105
- ulimit -s 65532 && (ulimit -n 10240 || true) && dune build src/app/archive/archive.exe src/app/rosetta/rosetta.exe src/app/rosetta/ocaml-signer/signer.exe --profile=$(DUNE_PROFILE )
109
+ ulimit -s 65532 && (ulimit -n 10240 || true) && $( DUNE ) build src/app/archive/archive.exe src/app/rosetta/rosetta.exe src/app/rosetta/ocaml-signer/signer.exe --profile=$(DUNE_PROFILE )
106
110
$(info Build complete)
107
111
108
112
build_rosetta_all_sigs : ocaml_checks
109
113
$(info Starting Build)
110
- ulimit -s 65532 && (ulimit -n 10240 || true) && dune build src/app/archive/archive.exe src/app/archive/archive_testnet_signatures.exe src/app/archive/archive_mainnet_signatures.exe src/app/rosetta/rosetta.exe src/app/rosetta/rosetta_testnet_signatures.exe src/app/rosetta/rosetta_mainnet_signatures.exe src/app/rosetta/ocaml-signer/signer.exe src/app/rosetta/ocaml-signer/signer_testnet_signatures.exe src/app/rosetta/ocaml-signer/signer_mainnet_signatures.exe --profile=$(DUNE_PROFILE )
114
+ ulimit -s 65532 && (ulimit -n 10240 || true) && $( DUNE ) build src/app/archive/archive.exe src/app/archive/archive_testnet_signatures.exe src/app/archive/archive_mainnet_signatures.exe src/app/rosetta/rosetta.exe src/app/rosetta/rosetta_testnet_signatures.exe src/app/rosetta/rosetta_mainnet_signatures.exe src/app/rosetta/ocaml-signer/signer.exe src/app/rosetta/ocaml-signer/signer_testnet_signatures.exe src/app/rosetta/ocaml-signer/signer_mainnet_signatures.exe --profile=$(DUNE_PROFILE )
111
115
$(info Build complete)
112
116
113
117
build_intgtest : ocaml_checks
114
118
$(info Starting Build)
115
- dune build --profile=$(DUNE_PROFILE ) src/app/test_executive/test_executive.exe src/app/logproc/logproc.exe
119
+ $( DUNE ) build --profile=$(DUNE_PROFILE ) src/app/test_executive/test_executive.exe src/app/logproc/logproc.exe
116
120
$(info Build complete)
117
121
118
122
client_sdk : ocaml_checks
119
123
$(info Starting Build)
120
- ulimit -s 65532 && (ulimit -n 10240 || true) && dune b src/lib/crypto/kimchi_bindings/js/node_js && dune b src/app/client_sdk/client_sdk.bc.js
124
+ ulimit -s 65532 && (ulimit -n 10240 || true) && $( DUNE ) b src/lib/crypto/kimchi_bindings/js/node_js && $( DUNE ) b src/app/client_sdk/client_sdk.bc.js
121
125
$(info Build complete)
122
126
123
127
client_sdk_test_sigs : ocaml_checks
124
128
$(info Starting Build)
125
- ulimit -s 65532 && (ulimit -n 10240 || true) && dune build src/app/client_sdk/tests/test_signatures.exe --profile=mainnet
129
+ ulimit -s 65532 && (ulimit -n 10240 || true) && $( DUNE ) build src/app/client_sdk/tests/test_signatures.exe --profile=mainnet
126
130
$(info Build complete)
127
131
128
132
client_sdk_test_sigs_nonconsensus : ocaml_checks
129
133
$(info Starting Build)
130
- ulimit -s 65532 && (ulimit -n 10240 || true) && dune build src/app/client_sdk/tests/test_signatures_nonconsensus.exe --profile=nonconsensus_mainnet
134
+ ulimit -s 65532 && (ulimit -n 10240 || true) && $( DUNE ) build src/app/client_sdk/tests/test_signatures_nonconsensus.exe --profile=nonconsensus_mainnet
131
135
$(info Build complete)
132
136
133
137
mina_signer : ocaml_checks
134
138
$(info Starting Build)
135
139
ulimit -s 65532 && (ulimit -n 10240 || true) \
136
- && dune b src/lib/crypto/kimchi_bindings/js/node_js \
137
- && dune b src/app/client_sdk/client_sdk.bc.js \
140
+ && $( DUNE ) b src/lib/crypto/kimchi_bindings/js/node_js \
141
+ && $( DUNE ) b src/app/client_sdk/client_sdk.bc.js \
138
142
&& (cd frontend/mina-signer; \
139
143
([ -d node_modules ] || npm i) && npm run copy-jsoo && npm run copy-wasm && npm run build; \
140
144
cd ../..)
@@ -148,57 +152,57 @@ snarkyjs: ocaml_checks
148
152
149
153
rosetta_lib_encodings : ocaml_checks
150
154
$(info Starting Build)
151
- ulimit -s 65532 && (ulimit -n 10240 || true) && dune build src/lib/rosetta_lib/test/test_encodings.exe --profile=mainnet
155
+ ulimit -s 65532 && (ulimit -n 10240 || true) && $( DUNE ) build src/lib/rosetta_lib/test/test_encodings.exe --profile=mainnet
152
156
$(info Build complete)
153
157
154
158
rosetta_lib_encodings_nonconsensus : ocaml_checks
155
159
$(info Starting Build)
156
- ulimit -s 65532 && (ulimit -n 10240 || true) && dune build src/nonconsensus/rosetta_lib/test/test_encodings.exe --profile=nonconsensus_mainnet
160
+ ulimit -s 65532 && (ulimit -n 10240 || true) && $( DUNE ) build src/nonconsensus/rosetta_lib/test/test_encodings.exe --profile=nonconsensus_mainnet
157
161
$(info Build complete)
158
162
159
163
dhall_types : ocaml_checks
160
164
$(info Starting Build)
161
- ulimit -s 65532 && (ulimit -n 10240 || true) && dune build src/app/dhall_types/dump_dhall_types.exe --profile=dev
165
+ ulimit -s 65532 && (ulimit -n 10240 || true) && $( DUNE ) build src/app/dhall_types/dump_dhall_types.exe --profile=dev
162
166
$(info Build complete)
163
167
164
168
replayer : ocaml_checks
165
169
$(info Starting Build)
166
- ulimit -s 65532 && (ulimit -n 10240 || true) && dune build src/app/replayer/replayer.exe --profile=testnet_postake_medium_curves
170
+ ulimit -s 65532 && (ulimit -n 10240 || true) && $( DUNE ) build src/app/replayer/replayer.exe --profile=testnet_postake_medium_curves
167
171
$(info Build complete)
168
172
169
173
delegation_compliance : ocaml_checks
170
174
$(info Starting Build)
171
- ulimit -s 65532 && (ulimit -n 10240 || true) && dune build src/app/delegation_compliance/delegation_compliance.exe --profile=testnet_postake_medium_curves
175
+ ulimit -s 65532 && (ulimit -n 10240 || true) && $( DUNE ) build src/app/delegation_compliance/delegation_compliance.exe --profile=testnet_postake_medium_curves
172
176
$(info Build complete)
173
177
174
178
missing_blocks_auditor : ocaml_checks
175
179
$(info Starting Build)
176
- ulimit -s 65532 && (ulimit -n 10240 || true) && dune build src/app/missing_blocks_auditor/missing_blocks_auditor.exe --profile=testnet_postake_medium_curves
180
+ ulimit -s 65532 && (ulimit -n 10240 || true) && $( DUNE ) build src/app/missing_blocks_auditor/missing_blocks_auditor.exe --profile=testnet_postake_medium_curves
177
181
$(info Build complete)
178
182
179
183
extract_blocks : ocaml_checks
180
184
$(info Starting Build)
181
- ulimit -s 65532 && (ulimit -n 10240 || true) && dune build src/app/extract_blocks/extract_blocks.exe --profile=testnet_postake_medium_curves
185
+ ulimit -s 65532 && (ulimit -n 10240 || true) && $( DUNE ) build src/app/extract_blocks/extract_blocks.exe --profile=testnet_postake_medium_curves
182
186
$(info Build complete)
183
187
184
188
archive_blocks : ocaml_checks
185
189
$(info Starting Build)
186
- ulimit -s 65532 && (ulimit -n 10240 || true) && dune build src/app/archive_blocks/archive_blocks.exe --profile=testnet_postake_medium_curves
190
+ ulimit -s 65532 && (ulimit -n 10240 || true) && $( DUNE ) build src/app/archive_blocks/archive_blocks.exe --profile=testnet_postake_medium_curves
187
191
$(info Build complete)
188
192
189
193
patch_archive_test : ocaml_checks
190
194
$(info Starting Build)
191
- ulimit -s 65532 && (ulimit -n 10240 || true) && dune build src/app/patch_archive_test/patch_archive_test.exe --profile=testnet_postake_medium_curves
195
+ ulimit -s 65532 && (ulimit -n 10240 || true) && $( DUNE ) build src/app/patch_archive_test/patch_archive_test.exe --profile=testnet_postake_medium_curves
192
196
$(info Build complete)
193
197
194
198
genesis_ledger_from_tsv : ocaml_checks
195
199
$(info Starting Build)
196
- ulimit -s 65532 && (ulimit -n 10240 || true) && dune build src/app/genesis_ledger_from_tsv/genesis_ledger_from_tsv.exe --profile=testnet_postake_medium_curves
200
+ ulimit -s 65532 && (ulimit -n 10240 || true) && $( DUNE ) build src/app/genesis_ledger_from_tsv/genesis_ledger_from_tsv.exe --profile=testnet_postake_medium_curves
197
201
$(info Build complete)
198
202
199
203
swap_bad_balances : ocaml_checks
200
204
$(info Starting Build)
201
- ulimit -s 65532 && (ulimit -n 10240 || true) && dune build src/app/swap_bad_balances/swap_bad_balances.exe --profile=testnet_postake_medium_curves
205
+ ulimit -s 65532 && (ulimit -n 10240 || true) && $( DUNE ) build src/app/swap_bad_balances/swap_bad_balances.exe --profile=testnet_postake_medium_curves
202
206
$(info Build complete)
203
207
204
208
dev : build
@@ -212,19 +216,19 @@ macos-portable:
212
216
@echo Find coda-daemon-macos.zip inside _build/
213
217
214
218
update-graphql :
215
- ulimit -s 65532 && (ulimit -n 10240 || true) && dune build --profile=$(DUNE_PROFILE ) graphql_schema.json
219
+ ulimit -s 65532 && (ulimit -n 10240 || true) && $( DUNE ) build --profile=$(DUNE_PROFILE ) graphql_schema.json
216
220
217
221
# #######################################
218
222
# # Lint
219
223
220
224
reformat : ocaml_checks git_hooks
221
- dune exec --profile=$(DUNE_PROFILE ) src/app/reformat/reformat.exe -- -path .
225
+ $( DUNE ) exec --profile=$(DUNE_PROFILE ) src/app/reformat/reformat.exe -- -path .
222
226
223
227
reformat-diff :
224
228
@ocamlformat --doc-comments=before --inplace $(shell git status -s | cut -c 4- | grep '\.mli\?$$' | while IFS= read -r f; do stat "$$f" >/dev/null 2>&1 && echo "$$f"; done) || true
225
229
226
230
check-format : ocaml_checks
227
- dune exec --profile=$(DUNE_PROFILE ) src/app/reformat/reformat.exe -- -path . -check
231
+ $( DUNE ) exec --profile=$(DUNE_PROFILE ) src/app/reformat/reformat.exe -- -path . -check
228
232
229
233
check-snarky-submodule :
230
234
./scripts/check-snarky-submodule.sh
@@ -255,12 +259,12 @@ deb_optimized:
255
259
256
260
build_pv_keys : ocaml_checks
257
261
$(info Building keys)
258
- ulimit -s 65532 && (ulimit -n 10240 || true) && env MINA_COMMIT_SHA1=$(GITLONGHASH ) dune exec --profile=$(DUNE_PROFILE ) src/lib/snark_keys/gen_keys/gen_keys.exe -- --generate-keys-only
262
+ ulimit -s 65532 && (ulimit -n 10240 || true) && env MINA_COMMIT_SHA1=$(GITLONGHASH ) $( DUNE ) exec --profile=$(DUNE_PROFILE ) src/lib/snark_keys/gen_keys/gen_keys.exe -- --generate-keys-only
259
263
$(info Keys built)
260
264
261
265
build_or_download_pv_keys : ocaml_checks
262
266
$(info Building keys)
263
- ulimit -s 65532 && (ulimit -n 10240 || true) && env MINA_COMMIT_SHA1=$(GITLONGHASH ) dune exec --profile=$(DUNE_PROFILE ) src/lib/snark_keys/gen_keys/gen_keys.exe -- --generate-keys-only
267
+ ulimit -s 65532 && (ulimit -n 10240 || true) && env MINA_COMMIT_SHA1=$(GITLONGHASH ) $( DUNE ) exec --profile=$(DUNE_PROFILE ) src/lib/snark_keys/gen_keys/gen_keys.exe -- --generate-keys-only
264
268
$(info Keys built)
265
269
266
270
publish_deb :
293
297
# # Benchmarks
294
298
295
299
benchmarks : ocaml_checks
296
- dune build src/app/benchmarks/main.exe
300
+ $( DUNE ) build src/app/benchmarks/main.exe
297
301
298
302
# #######################################
299
303
# Coverage testing and output
@@ -341,7 +345,7 @@ doc_diagrams: $(addsuffix .png,$(wildcard $(doc_diagram_sources)))
341
345
# Generate odoc documentation
342
346
343
347
ml-docs : ocaml_checks
344
- dune build --profile=$(DUNE_PROFILE ) @doc
348
+ $( DUNE ) build --profile=$(DUNE_PROFILE ) @doc
345
349
346
350
# #######################################
347
351
# To avoid unintended conflicts with file names, always add new targets to .PHONY
0 commit comments