Skip to content

Instantly share code, notes, and snippets.

@p-sherratt
Last active November 21, 2022 06:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save p-sherratt/662e6a83becd5b579c5ea90bc328f648 to your computer and use it in GitHub Desktop.
Save p-sherratt/662e6a83becd5b579c5ea90bc328f648 to your computer and use it in GitHub Desktop.
Makefile pretty help target

Another variant for the pile at: https://gist.github.com/prwhite/8168133

help:
	@sed \
		-e '/^[a-zA-Z0-9_\-]*:.*##/!d' \
		-e 's/:.*##\s*/:/' \
		-e 's/^\(.\+\):\(.*\)/$(shell tput setaf 6)\1$(shell tput sgr0):\2/' \
		$(MAKEFILE_LIST) | column -c2 -t -s :
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment