From 29eb4447f910336c3e2b17514dbaf59963126bf9 Mon Sep 17 00:00:00 2001 From: Neotamandua <107320179+Neotamandua@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:14:34 +0300 Subject: [PATCH] Add doc cmd to Makefiles Resolves #2008 --- Makefile | 12 ++++++++++++ circuits/Makefile | 2 ++ circuits/license/Makefile | 3 +++ consensus/Makefile | 3 +++ contracts/Makefile | 2 ++ contracts/alice/Makefile | 5 ++++- contracts/bob/Makefile | 2 ++ contracts/host_fn/Makefile | 2 ++ contracts/license/Makefile | 3 +++ contracts/stake/Makefile | 3 +++ contracts/transfer/Makefile | 3 +++ node-data/Makefile | 3 +++ node/Makefile | 3 +++ rusk-abi/Makefile | 3 +++ rusk-profile/Makefile | 3 +++ rusk-prover/Makefile | 3 +++ rusk-recovery/Makefile | 3 +++ rusk/Makefile | 3 +++ 18 files changed, 60 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9d825380ff..0a010f2340 100644 --- a/Makefile +++ b/Makefile @@ -48,6 +48,18 @@ clippy: ## Run clippy $(MAKE) -C ./node $@ $(MAKE) -C ./rusk/ $@ +doc: ## Run doc gen + $(MAKE) -j -C ./circuits $@ + $(MAKE) -C ./consensus $@ + $(MAKE) -j1 -C ./contracts $@ + $(MAKE) -C ./node $@ + $(MAKE) -C ./node-data $@ + $(MAKE) -C ./rusk/ $@ + $(MAKE) -C ./rusk-abi $@ + $(MAKE) -C ./rusk-profile $@ + $(MAKE) -C ./rusk-prover/ $@ + $(MAKE) -C ./rusk-recovery $@ + run: keys state web-wallet ## Run the server $(MAKE) -C ./rusk/ $@ diff --git a/circuits/Makefile b/circuits/Makefile index fd9a7155c3..a40c0d3a9a 100644 --- a/circuits/Makefile +++ b/circuits/Makefile @@ -12,6 +12,8 @@ test: ## Run all the tests for the circuits clippy: $(SUBDIRS) ## Run clippy +doc: $(SUBDIRS) ## Run doc gen + $(SUBDIRS): $(MAKE) -C $@ $(MAKECMDGOALS) diff --git a/circuits/license/Makefile b/circuits/license/Makefile index 278f9e79eb..318b74ae2a 100644 --- a/circuits/license/Makefile +++ b/circuits/license/Makefile @@ -12,4 +12,7 @@ test: ## Run the transfer circuits tests clippy: ## Run clippy @cargo clippy --all-features --release -- -D warnings +doc: ## Run doc gen + @cargo doc --release + .PHONY: all test help diff --git a/consensus/Makefile b/consensus/Makefile index bfb5df4aeb..261c456932 100644 --- a/consensus/Makefile +++ b/consensus/Makefile @@ -18,6 +18,9 @@ test: ## Run tests clippy: ## Run clippy @cargo clippy --all-features --release -- -D warnings +doc: ## Run doc gen + @cargo doc --release + clean: @cargo clean diff --git a/contracts/Makefile b/contracts/Makefile index 1563bd6313..7282b4d18a 100644 --- a/contracts/Makefile +++ b/contracts/Makefile @@ -13,6 +13,8 @@ wasm: $(SUBDIRS) ## Generate the WASM for all the contracts clippy: $(SUBDIRS) ## Run clippy +doc: $(SUBDIRS) ## Run doc gen + $(SUBDIRS): $(MAKE) -C $@ $(MAKECMDGOALS) diff --git a/contracts/alice/Makefile b/contracts/alice/Makefile index d1adbb3218..94344d3c1e 100755 --- a/contracts/alice/Makefile +++ b/contracts/alice/Makefile @@ -11,8 +11,11 @@ wasm: ## Generate the optimized WASM for the contract given -Z build-std=core,alloc,panic_abort \ -Z build-std-features=panic_immediate_abort \ --target wasm32-unknown-unknown -clippy: test: +clippy: + +doc: + .PHONY: all test wasm diff --git a/contracts/bob/Makefile b/contracts/bob/Makefile index 5e3dbe9af9..94344d3c1e 100755 --- a/contracts/bob/Makefile +++ b/contracts/bob/Makefile @@ -16,4 +16,6 @@ test: clippy: +doc: + .PHONY: all test wasm diff --git a/contracts/host_fn/Makefile b/contracts/host_fn/Makefile index 5e3dbe9af9..94344d3c1e 100755 --- a/contracts/host_fn/Makefile +++ b/contracts/host_fn/Makefile @@ -16,4 +16,6 @@ test: clippy: +doc: + .PHONY: all test wasm diff --git a/contracts/license/Makefile b/contracts/license/Makefile index 7bcf846b2b..8509ff159a 100644 --- a/contracts/license/Makefile +++ b/contracts/license/Makefile @@ -28,4 +28,7 @@ clippy: ## Run clippy @cargo clippy --all-features --release -- -D warnings @cargo clippy -Z build-std=core,alloc --release --target wasm32-unknown-unknown -- -D warnings +doc: ## Run doc gen + @cargo doc --release + .PHONY: all check test wasm help diff --git a/contracts/stake/Makefile b/contracts/stake/Makefile index d8babf8c28..04718942e6 100644 --- a/contracts/stake/Makefile +++ b/contracts/stake/Makefile @@ -28,4 +28,7 @@ clippy: ## Run clippy @cargo clippy --all-features --release -- -D warnings @cargo clippy -Z build-std=core,alloc --release --target wasm32-unknown-unknown -- -D warnings +doc: ## Run doc gen + @cargo doc --release + .PHONY: all check test wasm help diff --git a/contracts/transfer/Makefile b/contracts/transfer/Makefile index 045b9e2094..583fc1d965 100644 --- a/contracts/transfer/Makefile +++ b/contracts/transfer/Makefile @@ -28,4 +28,7 @@ clippy: ## Run clippy @cargo clippy --all-features --release -- -D warnings @cargo clippy -Z build-std=core,alloc --release --target wasm32-unknown-unknown -- -D warnings +doc: ## Run doc gen + @cargo doc --release + .PHONY: all check test wasm help diff --git a/node-data/Makefile b/node-data/Makefile index 184aeb1980..473c0d9ab6 100644 --- a/node-data/Makefile +++ b/node-data/Makefile @@ -10,4 +10,7 @@ clean: clippy: ## Run clippy @cargo clippy --all-features --release -- -D warnings +doc: ## Run doc gen + @cargo doc --release + .PHONY: test help clean diff --git a/node/Makefile b/node/Makefile index fc75ccd590..1a071c0c11 100644 --- a/node/Makefile +++ b/node/Makefile @@ -17,4 +17,7 @@ clippy: ## Run clippy @cargo clippy --all-features --release -- -D warnings @cargo check --benches +doc: ## Run doc gen + @cargo doc --release + .PHONY: test help binary clean diff --git a/rusk-abi/Makefile b/rusk-abi/Makefile index 4d1e4ac0c1..28aa42a419 100644 --- a/rusk-abi/Makefile +++ b/rusk-abi/Makefile @@ -11,4 +11,7 @@ clippy: ## Run clippy @cargo clippy --release -- -D warnings @cargo clippy --no-default-features --features=host --release -- -D warnings +doc: ## Run doc gen + @cargo doc --release + .PHONY: all help test diff --git a/rusk-profile/Makefile b/rusk-profile/Makefile index 04085a046b..283fea77ec 100644 --- a/rusk-profile/Makefile +++ b/rusk-profile/Makefile @@ -12,6 +12,9 @@ test: $(SUBDIRS) clippy: ## Run clippy @cargo clippy --release -- -D warnings +doc: ## Run doc gen + @cargo doc --release + $(SUBDIRS): $(MAKE) -C $@ diff --git a/rusk-prover/Makefile b/rusk-prover/Makefile index 4c7a45c11d..f7894ce86a 100644 --- a/rusk-prover/Makefile +++ b/rusk-prover/Makefile @@ -12,4 +12,7 @@ clippy: ## Run clippy @cargo clippy --release -- -D warnings @cargo clippy --release --no-default-features -- -D warnings +doc: ## Run doc gen + @cargo doc --release + .PHONY: all help test clippy diff --git a/rusk-recovery/Makefile b/rusk-recovery/Makefile index 59b4387778..14925075f1 100644 --- a/rusk-recovery/Makefile +++ b/rusk-recovery/Makefile @@ -14,4 +14,7 @@ clippy: ## Run clippy @cargo clippy --release --no-default-features --features state -- -D warnings @cargo clippy --release --no-default-features --features keys -- -D warnings +doc: ## Run doc gen + @cargo doc --release + .PHONY: test clippy help diff --git a/rusk/Makefile b/rusk/Makefile index 20a4b43179..43233cf45e 100644 --- a/rusk/Makefile +++ b/rusk/Makefile @@ -39,6 +39,9 @@ clippy: ## Run clippy -- -D warnings @cargo check --benches --features testwallet +doc: ## Run doc gen + @cargo doc --release + build: ## Build rusk binary @cargo build --release