Skip to content

Instantly share code, notes, and snippets.

@delonnewman
Created July 1, 2020 18:24
Show Gist options
  • Save delonnewman/966933e7b4dd66cdd3ec2a0eab9129eb to your computer and use it in GitHub Desktop.
Save delonnewman/966933e7b4dd66cdd3ec2a0eab9129eb to your computer and use it in GitHub Desktop.
List Makefile targets
# https://diamantidis.github.io/tips/2020/07/01/list-makefile-targets
.DEFAULT_GOAL := help
.PHONY: help
install: ## Install
@echo "Installing..."
run: ## Run
@echo "Running..."
help:
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| sed -n 's/^\(.*\): \(.*\)##\(.*\)/\1\3/p' \
| column -t -s ' '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment