Implement flexible target specification

See commit message.
Yes, it should be.