Skip to content

Commit 4c87a4e

Browse files
committed
make:help:less tokio output
1 parent 83fcf51 commit 4c87a4e

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

GNUmakefile

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,20 +95,26 @@ export RUSTC
9595
RUSTUP:=$(shell which rustup)
9696
export RUSTUP
9797

98+
FEATURES:=\
99+
async-std\
100+
101+
RELEASE:=\
102+
stable\
103+
104+
98105
-:
99106
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?##/ {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
100107
help:## help
101108
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
102-
rustup-install:rustup-install-stable## rustup-install
103-
rustup-install-stable:## rustup-install-stable
109+
rustup-install:rustup-install-$(RELEASE)## rustup-install
110+
rustup-install-$(RELEASE):## rustup-install-$(RELEASE)
104111
## install rustup sequence
105-
$(shell echo which rustup) || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain stable --profile default && . "$(HOME)/.cargo/env"
106-
$(shell echo which rustup) && rustup default stable
107-
rustup-install-nightly:## rustup-install-nightly
108-
## install rustup sequence
109-
$(shell echo which rustup) || curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain nightly --profile default && . "$(HOME)/.cargo/env"
110-
$(shell echo which rustup) && rustup default nightly
111-
112+
$(shell echo which rustup) || \
113+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
114+
sh -s -- -y --no-modify-path \
115+
--default-toolchain $(RELEASE) \
116+
--profile default && . "$(HOME)/.cargo/env"
117+
$(shell echo which rustup) && rustup default $(RELEASE)
112118

113119
cargo-b:## cargo-b
114120
[ -x "$(shell command -v $(RUSTUP))" ] || $(MAKE) rustup-install-stable

cargo.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
cargo-help:### cargo-help
44
@awk 'BEGIN {FS = ":.*?###"} /^[a-zA-Z_-]+:.*?###/ {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
55

6-
cargo-bt:cargo-build-tokio### cargo-bt
7-
cargo-build-tokio:### cargo-build-tokio
6+
cargo-bt:cargo-build-tokio
7+
cargo-build-tokio:
88
## make cargo-build-tokio q=true
99
@. $(HOME)/.cargo/env
1010
@RUST_BACKTRACE=all cargo b $(QUIET) --no-default-features --features tokio

0 commit comments

Comments
 (0)