I want to get the flags passed to a make target. Currently I'm able to get the words passed to it but I would need the flags also. This is the current code:
ifeq (docker,$(firstword $(MAKECMDGOALS)))
ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(ARGS):;@:)
endif
.PHONY: docker
docker:
@${DOCKER_FILE} $(ARGS)
I want to run something liek this: make docker up -d