-
Notifications
You must be signed in to change notification settings - Fork 455
/
Makefile
98 lines (69 loc) · 2.6 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
SHELL = /bin/bash
DUNE_BIN_DIR = ./_build/install/default/bin
build: ninja rewatch
dune build
./scripts/copyExes.js -compiler
watch:
dune build -w
bench:
$(DUNE_BIN_DIR)/syntax_benchmarks
dce:
reanalyze.exe -dce-cmt _build/default/compiler
rewatch:
cargo build --manifest-path rewatch/Cargo.toml
cp rewatch/target/debug/rewatch rewatch
./scripts/copyExes.js -rewatch
ninja/ninja:
./scripts/buildNinjaBinary.js
./scripts/copyExes.js -ninja
ninja: ninja/ninja
node_modules/.bin/semver:
npm install
test: lib
node scripts/test.js -all
test-syntax:
bash ./scripts/test_syntax.sh
make reanalyze
bash ./scripts/testok.sh
test-syntax-roundtrip:
ROUNDTRIP_TEST=1 bash ./scripts/test_syntax.sh
make reanalyze
bash ./scripts/testok.sh
test-gentype:
make -C tests/gentype_tests/typescript-react-example clean test
test-all: test test-gentype
reanalyze:
reanalyze.exe -set-exit-code -all-cmt _build/default/compiler _build/default/tests -exclude-paths compiler/outcome_printer,compiler/ml,compiler/js_parser,compiler/frontend,compiler/ext,compiler/depends,compiler/core,compiler/common,compiler/cmij,compiler/bsb_helper,compiler/bsb
lib: build node_modules/.bin/semver
./scripts/buildRuntime.sh
./scripts/prebuilt.js
artifacts: lib
./scripts/npmPack.js -updateArtifactList
# Builds the core playground bundle (without the relevant cmijs files for the runtime)
playground:
dune build --profile browser
cp ./_build/default/compiler/jsoo/jsoo_playground_main.bc.js playground/compiler.js
# Creates all the relevant core and third party cmij files to side-load together with the playground bundle
playground-cmijs: artifacts
node packages/playground-bundling/scripts/generate_cmijs.js
# Builds the playground, runs some e2e tests and releases the playground to the
# CDN (requires KEYCDN_USER and KEYCDN_PASSWORD set in the env variables)
playground-release: playground playground-cmijs
node playground/playground_test.js
sh playground/upload_bundle.sh
format:
bash scripts/format.sh
checkformat:
bash scripts/format_check.sh
clean-gentype:
make -C tests/gentype_tests/typescript-react-example clean
clean-rewatch:
cargo clean --manifest-path rewatch/Cargo.toml && rm -f rewatch/rewatch
clean:
(cd runtime && ../cli/rescript clean)
dune clean
clean-all: clean clean-gentype clean-rewatch
dev-container:
docker build -t rescript-dev-container docker
.DEFAULT_GOAL := build
.PHONY: build watch rewatch ninja bench dce test test-syntax test-syntax-roundtrip test-gentype test-all lib playground playground-cmijs playground-release artifacts format checkformat clean-gentype clean-rewatch clean clean-all dev-container