My Makefile looks like this:
.DEFAULT_GOAL := help
.PHONY: build clean-build start stop ssh getip
app = cp
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo "build To start building docker container"
@echo "clean-build Build from scratch without cache"
@echo "start Start up container build from build or clean-build"
@echo "stop Stop and delete container"
@echo "ssh Access container via ssh"
@echo "getip Get ip of container via docker inspect"
build:
docker build -t cdn/$(app) .
clean-build:
docker build --no-cache -t $(app) .
My question is, without adding all of my targets manually, is there a way for me to generate a help section that lists down all the targets in my file ?