This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SUPPORTED_COMMANDS := command1 command2 | |
SUPPORTS_MAKE_ARGS := $(findstring $(firstword $(MAKECMDGOALS)), $(SUPPORTED_COMMANDS)) | |
ifneq "$(SUPPORTS_MAKE_ARGS)" "" | |
# use the rest as arguments for the command | |
COMMAND_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)) | |
# ...and turn them into do-nothing targets | |
$(eval $(COMMAND_ARGS):;@:) | |
endif | |
command1: |