diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-07-23 08:08:33 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-07-23 14:01:45 +0800 |
| commit | 68a652ed2f51d366bb8033497e6dfe545895410e (patch) | |
| tree | d463833846248410733e196a0939c59cd67ca8a2 /Makefile | |
feat: scaffold crate structure and implement core macros
Add the project skeleton, LICENSE files, README, Makefile, doc
examples, and the initial implementation of `#[func]`, `invoke!`,
and `select!` procedural macros.
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8176780 --- /dev/null +++ b/Makefile @@ -0,0 +1,50 @@ +.PHONY: check clippy check-lock test-crate test-sync test-async expand fmt-expand lock + +# make check +check: clippy expand fmt-expand test-crate test-sync test-async check-lock + +# make lock +lock: + for f in doc/usage/*_expand.rs; do \ + cp "$$f" "$$f.lock"; \ + done + +# DO NOT RUN THEM + +clippy: + cargo clippy -- -D warnings + +test-crate: + cargo test + +test-sync: + cargo test -p might_be_async_test_sync --manifest-path test/Cargo.toml + +test-async: + cargo test -p might_be_async_test_async --features metadata_async --manifest-path test/Cargo.toml + +expand: + python3 scripts/expand_codes.py + +fmt-expand: + for f in doc/usage/*_expand.rs; do \ + case "$$f" in *.lock) ;; *) rustfmt "$$f" --edition 2024 --config blank_lines_lower_bound=0 ;; esac; \ + done + +check-lock: + errors=0; \ + for lock in doc/usage/*_expand.rs.lock; do \ + [ -f "$$lock" ] || continue; \ + base="$${lock%.lock}"; \ + if [ ! -f "$$base" ]; then \ + echo "ERROR: $$lock has no matching source file"; \ + errors=1; \ + elif git --no-pager diff --no-index --quiet "$$lock" "$$base" 2>/dev/null; then \ + :; \ + else \ + git --no-pager diff --no-index "$$lock" "$$base" || true; \ + echo "ERROR: $$base differs from $$lock"; \ + errors=1; \ + fi; \ + done; \ + exit $$errors |
