Created
February 25, 2021 21:43
-
-
Save hugoprudente/05eb070821b1694b45f118b49255fc2b to your computer and use it in GitHub Desktop.
Makefile with help
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
define PRINT_HELP_PYSCRIPT | |
import re, sys | |
for line in sys.stdin: | |
match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line) | |
if match: | |
target, help = match.groups() | |
print("%-30s %s" % (target, help)) | |
endef | |
export PRINT_HELP_PYSCRIPT | |
help: | |
@python3 -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) | |
image: secrets ## Build the container image. | |
docker build --file Dockerfile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The output will be like: