Let's not use make

This commit is contained in:
Luke Murphy 2020-03-19 00:49:30 +01:00
parent 1c20a199b4
commit b68f858994
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -1,22 +0,0 @@
PYTHON ?= $(shell command -v python3 python|head -n1)
.PHONY: default
default: help
define PRINT_HELP_PYSCRIPT
import re, sys
print("Usage: make <target>")
cmds = {}
for line in sys.stdin:
match = re.match(r'^([a-zA-Z_-]+):.*?## (.*)$$', line)
if match:
target, help = match.groups()
cmds.update({target: help})
for cmd in sorted(cmds):
print(" * '%s' - %s" % (cmd, cmds[cmd]))
endef
export PRINT_HELP_PYSCRIPT
.PHONY: help
help:
@$(PYTHON) -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)