Created
March 8, 2023 19:21
-
-
Save bradobro/d17ac6c7aecbd0e1dcb4b65a44b2a541 to your computer and use it in GitHub Desktop.
Makefile: target to list targets
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
# Print out all targets and the line preceeding them. | |
help: | |
@# only print out targets that are lowercase letters and dashes followed by a colon | |
@awk '/^[[a-z\-]*:/{printf("%-15s %s\n", $$1, a)}{a=$$0}' ./Makefile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment