Implement flexible target specification

See commit message.
I disagree. We should support exactly one target that we use, instead of normalizing first.