Add place holder makefile
This commit is contained in:
parent
8342c9c2d5
commit
4b64c55db6
22
Makefile
Normal file
22
Makefile
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
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)
|
Reference in New Issue
Block a user