List Makefile targets

Posted by Jim Nicholson on February 25, 2013 · 1 min read

This snippet can be helpful if you frequently work with large Makefiles.

make -qp | awk -F':' '/^[a-zA-Z0-9][^$#\/\t=]*:([^=]|$)/ {split($1,A,/ /);for(i in A)print A[i]}'