annotate bin/make-targets.sh @ 845:70ae14b6be51

[sync] ~/k0s is no longer in PATH as it corrupts PYTHONPATH
author Jeff Hammel <k0scist@gmail.com>
date Thu, 17 Aug 2017 09:48:49 -0700
parents d4403d13fb31
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
343
71345f4de3ce programs to list make targets
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
1 #!/bin/bash
71345f4de3ce programs to list make targets
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
2 # list makefile targets
790
d4403d13fb31 correct
Jeff Hammel <k0scist@gmail.com>
parents: 343
diff changeset
3 # from http://stackoverflow.com/questions/4219255/how-do-you-get-the-list-of-targets-in-a-makefile
d4403d13fb31 correct
Jeff Hammel <k0scist@gmail.com>
parents: 343
diff changeset
4 make -pRrq 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($1 !~ "^[#.]") {print $1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$'