⭐️ A friendly language for building type-safe, scalable systems!
at main 1.9 kB view raw
1# 2# Goals to be specified by user 3# 4 5.PHONY: help 6help: 7 @cat $(MAKEFILE_LIST) | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' 8 9.PHONY: build 10build: ## Build the compiler 11 cargo build --release 12 13.PHONY: install 14install: ## Build the Gleam compiler and place it on PATH 15 cd gleam-bin && cargo install --path . --force --locked 16 17.PHONY: test 18test: ## Run the compiler unit tests 19 cargo test --quiet 20 cargo clippy 21 cd test/language && make 22 cd test/javascript_prelude && make test 23 cd test/project_erlang && cargo run clean && cargo run check && cargo run test 24 cd test/project_javascript && cargo run clean && cargo run check && cargo run test 25 cd test/project_deno && cargo run clean && cargo run check && cargo run test 26 cd test/hextarball && make test 27 cd test/running_modules && make test 28 cd test/subdir_ffi && make 29 30.PHONY: language-test 31language-test: ## Run the language integration tests for all targets 32 cd test/language && make 33 34.PHONY: language-test-watch 35language-test-watch: ## Run the language integration tests for all targets when files change 36 watchexec "cd test/language && make" 37 38.PHONY: javascript-prelude-test 39javascript-prelude-test: ## Run the JavaScript prelude core tests 40 cd test/javascript_prelude && make test 41 42.PHONY: javascript-prelude-test-watch 43javascript-prelude-test-watch: ## Run the JavaScript prelude core tests when files change 44 watchexec "cd test/javascript_prelude && make test" 45 46.PHONY: test-watch 47test-watch: ## Run compiler tests when files change 48 watchexec -e rs,toml,gleam,html,capnp "cargo test --quiet" 49 50.PHONY: export-hex-tarball-test 51export-hex-tarball-test: ## Run `gleam export hex-tarball` and verify it is created 52 cd test/hextarball && make test 53 54.PHONY: benchmark 55benchmark: ## Run the benchmarks 56 cd benchmark/list && make 57 58# Debug print vars with `make print-VAR_NAME` 59print-%: ; @echo $*=$($*)