Created
May 27, 2018 22:52
-
-
Save agwells/d69a01e4fd1f533470498e7d3aca8c5e to your computer and use it in GitHub Desktop.
List the available targets in a makefile
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
#!/bin/bash | |
# A utility to list all the tasks in the current directory's makefile. | |
# | |
# Idea taken from https://stackoverflow.com/a/24453375/468642 | |
source /usr/share/bash-completion/completions/make | |
export _make_target_extract_script | |
sed -nrf <(_make_target_extract_script --) ./Makefile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment