Makefile
· 320 B · Makefile
خام
.DEFAULT_GOAL := help
.PHONY: goal1 goal2 help
######################
## goal1: Some goal 1
goal1:
@echo "This is goal 1"
## goal1: Some goal 2
goal2:
@echo "This is goal 2"
######################
## help: This help message
help: Makefile
@echo "Available goals:"
@sed -n 's/^##/ /p' $< | column -t -s ':'
| 1 | .DEFAULT_GOAL := help |
| 2 | .PHONY: goal1 goal2 help |
| 3 | |
| 4 | ###################### |
| 5 | |
| 6 | ## goal1: Some goal 1 |
| 7 | goal1: |
| 8 | @echo "This is goal 1" |
| 9 | |
| 10 | ## goal1: Some goal 2 |
| 11 | goal2: |
| 12 | @echo "This is goal 2" |
| 13 | |
| 14 | ###################### |
| 15 | |
| 16 | ## help: This help message |
| 17 | help: Makefile |
| 18 | @echo "Available goals:" |
| 19 | @sed -n 's/^##/ /p' $< | column -t -s ':' |
| 20 |