public
Created

maketargets

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/bin/sh
#
# Prints out the targets available to make.
#
# Usage: maketargets file?
#
# On windows probably pipe into sort and uniq, e.g.
#
# maketargets | sort | uniq
#
 
files="$@ GNUMakefile Makefile makefile"
for f in $files; do
test -f $f && {
grep "^[A-Za-z0-9_\-\.\/\\]*:" $f | cut -d: -f1
}
done

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.