Created
July 21, 2020 22:55
-
-
Save luzfcb/88b43c4f69c943841a155e693fccdeae to your computer and use it in GitHub Desktop.
This file contains 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
.DEFAULT_GOAL := help | |
define PRINT_HELP_PYSCRIPT | |
import re, sys | |
output = [] | |
for line in sys.stdin: | |
match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line) | |
if match: | |
target, help = match.groups() | |
output.append("%-20s %s" % (target, help)) | |
output.sort() | |
print('\n'.join(output)) | |
endef | |
export PRINT_HELP_PYSCRIPT | |
help: ## The command that generated this list | |
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment