-
Notifications
You must be signed in to change notification settings - Fork 482
Expand file tree
/
Copy pathMakefile
More file actions
108 lines (75 loc) · 2.93 KB
/
Makefile
File metadata and controls
108 lines (75 loc) · 2.93 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
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 --release
./scripts/copyExes.js --rewatch
# Generate EmbedLang JSON/OpenAPI schemas into docs/schemas
schemas: rewatch
@mkdir -p docs/schemas
@rewatch/target/release/rescript schema embeds --output-dir docs/schemas --openapi >/dev/null
@echo "Schemas written to docs/schemas"
ninja/ninja:
./scripts/buildNinjaBinary.js
ninja: ninja/ninja
./scripts/copyExes.js --ninja
test: build lib
node scripts/test.js -all
test-analysis:
make -C tests/analysis_tests clean test
test-tools:
make -C tests/tools_tests clean test
test-syntax:
./scripts/test_syntax.sh
test-syntax-roundtrip:
ROUNDTRIP_TEST=1 ./scripts/test_syntax.sh
test-gentype:
make -C tests/gentype_tests/typescript-react-example clean test
make -C tests/gentype_tests/stdlib-no-shims clean test
test-rewatch:
./rewatch/tests/suite-ci.sh
test-all: test test-gentype test-analysis test-tools test-rewatch
reanalyze:
reanalyze.exe -set-exit-code -all-cmt _build/default/compiler _build/default/tests -exclude-paths compiler/outcome_printer,compiler/ml,compiler/frontend,compiler/ext,compiler/depends,compiler/core,compiler/common,compiler/cmij,compiler/bsb_helper,compiler/bsb
lib:
yarn workspace @rescript/runtime build
artifacts: lib
./scripts/updateArtifactList.js
# Builds the core playground bundle (without the relevant cmijs files for the runtime)
playground:
dune build --profile browser
cp -f ./_build/default/compiler/jsoo/jsoo_playground_main.bc.js packages/playground/compiler.js
# Creates all the relevant core and third party cmij files to side-load together with the playground bundle
playground-cmijs: artifacts
yarn workspace playground build
# Builds the playground, runs some e2e tests and releases the playground to the
# Cloudflare R2 (requires Rclone `rescript:` remote)
playground-release: playground playground-cmijs
yarn workspace playground test
yarn workspace playground upload-bundle
format:
./scripts/format.sh
checkformat:
./scripts/format_check.sh
clean-gentype:
make -C tests/gentype_tests/typescript-react-example clean
make -C tests/gentype_tests/stdlib-no-shims clean
clean-rewatch:
cargo clean --manifest-path rewatch/Cargo.toml && rm -f rewatch/rewatch
clean-lib:
yarn workspace @rescript/runtime rescript clean
clean: clean-lib
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-analysis test-tools test-all lib playground playground-cmijs playground-release artifacts format checkformat clean-gentype clean-rewatch clean clean-all dev-container schemas