mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-03-31 15:07:47 +01:00
ac6d046c63
rename template adapter to flasher, and add title to base notification class Wip
28 lines
767 B
Makefile
28 lines
767 B
Makefile
.PHONY: help
|
|
|
|
COLOR_RESET = \033[0m
|
|
COLOR_INFO = \033[32m
|
|
COLOR_COMMENT = \033[33m
|
|
|
|
## Help
|
|
help:
|
|
@printf "${COLOR_COMMENT}Usage:${COLOR_RESET}\n"
|
|
@printf " make [target]\n\n"
|
|
@printf "${COLOR_COMMENT}Available targets:${COLOR_RESET}\n"
|
|
@awk '/^[a-zA-Z\-\_0-9\.@]+:/ { \
|
|
helpMessage = match(lastLine, /^## (.*)/); \
|
|
if (helpMessage) { \
|
|
helpCommand = substr($$1, 0, index($$1, ":")); \
|
|
helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \
|
|
printf " ${COLOR_INFO}%-16s${COLOR_RESET} %s\n", helpCommand, helpMessage; \
|
|
} \
|
|
} \
|
|
{ lastLine = $$0 }' $(MAKEFILE_LIST)
|
|
|
|
check_defined = \
|
|
$(strip $(foreach 1,$1, \
|
|
$(call __check_defined,$1,$(strip $(value 2)))))
|
|
__check_defined = \
|
|
$(if $(value $1),, \
|
|
$(error Undefined $1$(if $2, ($2))))
|