blob: 5be984b8cf4e627701a6b3107eac644900365100 (
plain)
1
2
3
4
5
6
7
8
|
function __fish_print_make_targets
set files Makefile makefile GNUmakefile
# Some seds (e.g. on Mac OS X), don't support \n in the RHS
# Use a literal newline instead
# http://sed.sourceforge.net/sedfaq4.html#s4.1
sgrep -h -E '^[^#%=$[:space:]][^#%=$]*:([^=]|$)' $files ^/dev/null | cut -d ":" -f 1 | sed -e 's/^ *//;s/ *$//;s/ */\\
/g' ^/dev/null
end
|