4 ms·
I have another version based on awk[1], which instead of listing all targets, it will only list targets with a help message in the format of `@: #`, e.g. i
by sirn 6y ago
I have another version based on awk[1], which instead of listing all targets, it will only list targets with a help message in the format of `@: #`, e.g.
install:
@: # Install the application to the given PREFIX.
@: # Unless specified otherwise, PREFIX defaults to /usr/local
which will generates
Usage: make TARGET
You must run make with one of the following targets to continue:
Run make VERBOSE=1 TARGET for verbose log.
help:
Print this help
install:
Install the application to the given PREFIX.
Unless specified otherwise, PREFIX defaults to /usr/local
It doesn't read from MAKEFILE_LIST, though.
[1]: https://gist.github.com/sirn/6a2f4c0b1cb917ef54b1fb813330d8e8 https://gist.github.com/sirn/6a2f4c0b1cb917ef54b1fb813330d8e...