Implement flexible target specification

See commit message.
Not yet, no.