Skip to content

Instantly share code, notes, and snippets.

@rdnt
Created February 25, 2021 13:58
Show Gist options
  • Save rdnt/34a539be516648b9523efd431973dac1 to your computer and use it in GitHub Desktop.
Save rdnt/34a539be516648b9523efd431973dac1 to your computer and use it in GitHub Desktop.
self-documenting-makefile
#! Based on https://www.freecodecamp.org/news/self-documenting-makefile/
MAKEFLAGS := --no-print-directory
help:
@egrep -h '\s#\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?# "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
build: # builds
@echo "build"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment