Skip to content

Instantly share code, notes, and snippets.

@dedeibel
Last active April 8, 2017 21:50
Show Gist options
  • Save dedeibel/3a02e892bbfbedb646ba27dbe7c68606 to your computer and use it in GitHub Desktop.
Save dedeibel/3a02e892bbfbedb646ba27dbe7c68606 to your computer and use it in GitHub Desktop.
list all make targets to mark them as phony
list-phony:
@perl -ne 'push @a, $$1 if m/^([\w\d-]+):\s/; END { print ".PHONY: ", join(" ", sort @a), "\n" }' Makefile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment