Skip to content

Commit

Permalink
common-rules.mk: Add make rustup to check rust toolchain status
Browse files Browse the repository at this point in the history
  • Loading branch information
th0ma7 committed Feb 6, 2024
1 parent 012f05a commit b58432f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions mk/spksrc.common-rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,27 @@

###

.PHONY: clean
clean:
rm -fr work work-* build-*.log publish-*.log status-*.log

.PHONY: smart-clean
smart-clean:
rm -rf $(WORK_DIR)/$(PKG_DIR)
rm -f $(WORK_DIR)/.$(COOKIE_PREFIX)*

.PHONY: changelog
changelog:
git log --pretty=format:"- %s" -- $(PWD)

# If the first argument is "run"...
ifeq (rustup,$(firstword $(MAKECMDGOALS)))
# use the rest as arguments for "run"
RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# ...and turn them into do-nothing targets
$(eval $(RUN_ARGS):;@:)
endif

.PHONY: rustup
rustup:
@rustup $(RUN_ARGS)

0 comments on commit b58432f

Please sign in to comment.