From d88a76131bb70ba2ccace46197bb1b7dd884852b Mon Sep 17 00:00:00 2001 From: Jan Ferdinand Sauer Date: Mon, 9 Sep 2024 13:09:09 +0200 Subject: [PATCH] build: Remove Makefile The Makefile simplified building Triton VM despite the cyclic dependency in its build process. Now, the cyclic build dependency is broken. Cargo is the recommended build tool for Triton VM. --- .gitignore | 3 --- Makefile | 72 ------------------------------------------------------ 2 files changed, 75 deletions(-) delete mode 100644 Makefile diff --git a/.gitignore b/.gitignore index 3e914a14..6b7b618c 100644 --- a/.gitignore +++ b/.gitignore @@ -29,9 +29,6 @@ Cargo.lock # MSVC Windows builds of rustc generate these, which store debugging information *.pdb -# Added by Makefile configuration -/makefile-target - ### VisualStudioCode ### .vscode/* !.vscode/settings.json diff --git a/Makefile b/Makefile deleted file mode 100644 index 02f21d50..00000000 --- a/Makefile +++ /dev/null @@ -1,72 +0,0 @@ -# Treat `cargo clippy` warnings as errors. -CLIPPY_ARGS = --all-targets -- -D warnings - -# Fail if `cargo fmt` changes anything. -FMT_ARGS = --all -- --check - -# Treat all warnings as errors -export RUSTFLAGS = -Dwarnings - -# Set another target dir than default to avoid builds from `make` -# to invalidate cache from barebones use of `cargo` commands. -# The cache is cleared when a new `RUSTFLAGS` value is encountered, -# so to prevent the two builds from interfering, we use two dirs. -export CARGO_TARGET_DIR=./makefile-target - -# By first building tests, and consequently building constraints, before -# running `fmt` and `clippy`, the auto-generated constraints are exposed -# to `fmt` and `clippy`. -default: build-constraints build-tests build-bench fmt-only clippy-only clean-constraints - -# Run `make all` when the constraints are already in place. -all: test build-bench fmt-only clippy-only - -# Alternative to `cargo build --all-targets` -build: build-constraints - cargo build --all-targets - -# Alternative to `cargo test --all-targets` -test: - cargo test --all-targets - -# Alternative to `cargo bench --all-targets` -bench: build-constraints - cargo bench --all-targets - -# Alternative to `cargo clippy ...` -clippy: build-constraints - cargo clippy $(CLIPPY_ARGS) - -# Alternative to `cargo fmt ...` -fmt-check: build-constraints - cargo fmt $(FMT_ARGS) - -# Alternative to `cargo clean` -clean: - cargo clean - make clean-constraints - -# Auxiliary targets -# -# Assume constraints are compiled. - -build-tests: - cargo test --all-targets --no-run - -build-bench: - cargo bench --all-targets --no-run - -build-constraints: - cargo run --bin constraint-evaluation-generator - -clean-constraints: - git restore --staged triton-vm/src/table/constraints.rs - git restore --staged triton-vm/src/table/degree_lowering_table.rs - git restore triton-vm/src/table/constraints.rs - git restore triton-vm/src/table/degree_lowering_table.rs - -fmt-only: - cargo fmt $(FMT_ARGS) - -clippy-only: - cargo clippy $(CLIPPY_ARGS)